vim-polyglot/spec/loading_spec.rb

29 lines
642 B
Ruby
Raw Normal View History

require 'spec_helper'
2013-12-26 18:06:18 -05:00
require 'timeout'
describe "My Vim plugin" do
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.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
end
end
end
after(:all) do
vim.kill
end
end