2013-09-14 20:09:32 +02:00
|
|
|
require 'spec_helper'
|
2013-12-27 00:06:18 +01:00
|
|
|
require 'timeout'
|
2013-09-14 20:09:32 +02:00
|
|
|
|
|
|
|
describe "My Vim plugin" do
|
|
|
|
|
2013-12-26 23:03:02 +01: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 23:52:55 +02:00
|
|
|
extensions.sort!.uniq!.each do |ext|
|
2019-03-10 19:11:11 +01:00
|
|
|
if ext.match?(/^[a-z\.]+$/i)
|
2019-03-10 18:49:28 +01: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 23:42:00 +01:00
|
|
|
end
|
2013-09-14 20:09:32 +02:00
|
|
|
end
|
|
|
|
end
|
2019-05-01 23:52:55 +02:00
|
|
|
|
|
|
|
after(:all) do
|
|
|
|
vim.kill
|
|
|
|
end
|
2013-09-14 20:09:32 +02:00
|
|
|
end
|