summaryrefslogtreecommitdiffstats
path: root/spec/loading_spec.rb
blob: 06234340c4107e2e4675abc539f4e40edb6495e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'spec_helper'
require 'tempfile'

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|
    unless ext.match(/stylus$/)
      it "should parse #{ext} file" do
        write_file "#{ext}", ""
        vim.edit "#{ext}"
        vim.insert "sample"
        vim.write
      end
    end
  end
end