2013-09-14 14:09:32 -04:00
|
|
|
require 'spec_helper'
|
2013-12-26 17:03:02 -05:00
|
|
|
require 'tempfile'
|
2013-09-14 14:09:32 -04:00
|
|
|
|
|
|
|
describe "My Vim plugin" do
|
|
|
|
|
2013-12-26 17:03:02 -05:00
|
|
|
extensions = `cat ftdetect/polyglot.vim | grep '^au' | tr "\t" ' ' | cut -d ' ' -f 3 | grep -v / | grep -v '^\*$' | grep -v '^$'`.strip
|
|
|
|
|
|
|
|
extensions.gsub!(/\[(.).+\]/) { $1 }.gsub!('*', 'test')
|
|
|
|
|
|
|
|
extensions = extensions.split(/[\n,]/)
|
|
|
|
|
|
|
|
extensions.each do |ext|
|
2013-12-26 17:42:00 -05:00
|
|
|
unless ext.match(/styl(us)?$/)
|
2013-12-26 17:42:00 -05:00
|
|
|
it "should parse #{ext} file" do
|
|
|
|
write_file "#{ext}", ""
|
|
|
|
vim.edit "#{ext}"
|
|
|
|
vim.insert "sample"
|
|
|
|
vim.write
|
|
|
|
end
|
2013-09-14 14:09:32 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|