diff options
-rw-r--r-- | .travis.yml | 9 | ||||
-rw-r--r-- | Gemfile | 4 | ||||
-rw-r--r-- | Gemfile.lock | 28 | ||||
-rw-r--r-- | spec/loading_spec.rb | 28 | ||||
-rwxr-xr-x | spec/spec_helper.rb | 20 | ||||
-rwxr-xr-x | test | 19 |
6 files changed, 21 insertions, 87 deletions
diff --git a/.travis.yml b/.travis.yml index 78f7ea97..3d0494ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,6 @@ -language: ruby -rvm: - - 2.6 -sudo: false +language: bash addons: apt: packages: - vim-gtk -before_script: - - "./build" -script: xvfb-run bundle exec rspec --format=documentation +script: xvfb-run ./test diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 4a544814..00000000 --- a/Gemfile +++ /dev/null @@ -1,4 +0,0 @@ -source 'https://rubygems.org' - -gem 'vimrunner' -gem 'rspec' diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index bfae97ff..00000000 --- a/Gemfile.lock +++ /dev/null @@ -1,28 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - diff-lcs (1.3) - rspec (3.8.0) - rspec-core (~> 3.8.0) - rspec-expectations (~> 3.8.0) - rspec-mocks (~> 3.8.0) - rspec-core (3.8.0) - rspec-support (~> 3.8.0) - rspec-expectations (3.8.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-mocks (3.8.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-support (3.8.0) - vimrunner (0.3.4) - -PLATFORMS - ruby - -DEPENDENCIES - rspec - vimrunner - -BUNDLED WITH - 1.16.2 diff --git a/spec/loading_spec.rb b/spec/loading_spec.rb deleted file mode 100644 index e9e1f3b8..00000000 --- a/spec/loading_spec.rb +++ /dev/null @@ -1,28 +0,0 @@ -require 'spec_helper' -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| - if ext.match?(/^[a-z\.]+$/i) - 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 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb deleted file mode 100755 index 21ab43cc..00000000 --- a/spec/spec_helper.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'vimrunner' -require 'vimrunner/rspec' - -$plugin_path = File.expand_path('../..', __FILE__) - -Vimrunner::RSpec.configure do |config| - config.reuse_server = false - - # Decide how to start a Vim instance. In this block, an instance should be - # spawned and set up with anything project-specific. - config.start_vim do - vim = Vimrunner.start - - # Setup your plugin in the Vim instance - vim.add_plugin($plugin_path) - - # The returned value is the Client available in the tests. - vim - end -end @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e + +vim -N --startuptime /dev/stdout -u <( + echo "filetype plugin indent on" + echo "syntax enable" + echo "let &rtp='$PWD,'.&rtp" + cat ftdetect/polyglot.vim | grep -E 'set ft=[a-z-]+' -o | sort | uniq | awk -F '=' '{ print $2 }' | while read ft; do + echo "try" + echo " enew" + echo " set ft=$ft" + echo "catch" + echo " echo v:exception" + echo " exec ':cq!'" + echo "endtry" + done + echo "exec ':q!'" +) |