2013-09-14 14:09:32 -04:00
|
|
|
require 'spec_helper'
|
2013-12-26 18:06:18 -05:00
|
|
|
require 'timeout'
|
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,]/)
|
|
|
|
|
2019-05-01 17:52:55 -04:00
|
|
|
extensions.sort!.uniq!.each do |ext|
|
2019-03-10 14:11:11 -04:00
|
|
|
if ext.match?(/^[a-z\.]+$/i)
|
2019-03-10 13:49:28 -04:00
|
|
|
it "should parse #{ext} file" do
|
|
|
|
Timeout::timeout(20) do
|
|
|
|
write_file "#{ext}", ""
|
|
|
|
vim.edit "#{ext}"
|
|
|
|
vim.insert "sample"
|
|
|
|
vim.write
|
|
|
|
end
|
2013-12-26 17:42:00 -05:00
|
|
|
end
|
2013-09-14 14:09:32 -04:00
|
|
|
end
|
|
|
|
end
|
2019-05-01 17:52:55 -04:00
|
|
|
|
|
|
|
after(:all) do
|
|
|
|
vim.kill
|
|
|
|
end
|
2013-09-14 14:09:32 -04:00
|
|
|
end
|