mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Update travis script
This commit is contained in:
@@ -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
|
||||
|
||||
28
Gemfile.lock
28
Gemfile.lock
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
19
test
Executable file
19
test
Executable file
@@ -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!'"
|
||||
)
|
||||
Reference in New Issue
Block a user