This commit is contained in:
Andy K. Massimino
2018-12-27 20:28:22 -05:00
parent 55cff87749
commit 060b55c8bf
5 changed files with 99 additions and 0 deletions

7
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,7 @@
image: thinca/vim
before_script:
git clone https://github.com/junegunn/vader.vim.git test/vader/vader.vim
script: test/vader/run

24
test/vader/minvimrc Normal file
View File

@@ -0,0 +1,24 @@
set nocompatible
" load match-up
let s:path = simplify(expand('<sfile>:h').'/../..')
let &rtp = s:path.',' . &rtp
let &rtp .= ',vader.vim'
let &rtp .= ','.s:path.'/after'
" rtp for testing files
let &rtp = s:path.'/test/rtp,' . &rtp
" load other plugins, if necessary
" let &rtp = '~/path/to/other/plugin,' . &rtp
if empty(globpath(&rtp, 'plugin/vader.vim'))
echoerr 'vader not found'
exit!
endif
filetype plugin indent on
syntax enable
" match-up options go here

View File

@@ -0,0 +1,23 @@
Given text (Single-line parentheses):
(hello world)|
Before ():
normal! gg0f(
Do (Delete %):
d%
Expect text (Verify):
|
Do (Delete v%):
dv%
Expect text (Verify):
)|
Do (Delete V%):
dV%
Expect text (Verify):
Do (Delete <c-v>%):
d%
Expect text (Verify):
|

5
test/vader/run Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
cd "$(dirname "${BASH_SOURCE[0]}")"
vim -es -Nu minvimrc +"Vader! ${1:-*}"

40
test/vader/text_obj.vader Normal file
View File

@@ -0,0 +1,40 @@
Given text (Parentheses):
(
)
( hello
)
(vibd)
(dvib)
(dib)
()
Do (Delete inner %):
16gg0
di%
kdi%
kdvi%
kvi%d
3kdi%
4kdi%
Expect tex (Verify):
(
)
(
)
()
(b)
()
()