vim-polyglot/spec/loading_spec.rb

23 lines
535 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.each do |ext|
2013-12-26 18:06:18 -05:00
it "should parse #{ext} file" do
Timeout::timeout(5) do
write_file "#{ext}", ""
vim.edit "#{ext}"
vim.insert "sample"
vim.write
end
end
end
end