1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:40:05 +08:00
This commit is contained in:
wsdjeg 2017-04-14 21:46:34 +08:00
parent 364c73c0fb
commit fbf89590a9
3 changed files with 28 additions and 9 deletions

View File

@ -41,13 +41,5 @@ script:
elif [ "$LINT" = "vint-errors" ]; then
vint --error .
elif [ "$LINT" = "vader" ]; then
vim -Nu <(cat <<-EOF
filetype off |
set rtp+=vader.vim |
set rtp+=. |
set rtp+=after |
filetype plugin indent on |
syntax enable |
EOF
) -c 'Vader! test/*' > /dev/null
vim -Nu test/test.vim -c 'Vader! test/*'
fi

21
test/test.vader Normal file
View File

@ -0,0 +1,21 @@
Execute (Clear search history):
for _ in range(&history)
call histdel('/', -1)
endfor
Given (Search and destroy):
I'm a street walking cheetah with a heart full of napalm
I'm a runaway son of the nuclear A-bomb
I'm a world's forgotten boy
The one who searches and destroys
Do (Searches):
/street\<CR>
/walking\<CR>
/cheetah\<CR>
/runaway\<CR>
/search\<CR>
Execute (Assertions):
Log string(map(range(1, &history), 'histget("/", - v:val)'))
AssertEqual 'search', histget('/', -1)

6
test/test.vim Normal file
View File

@ -0,0 +1,6 @@
filetype off
set rtp+=/tmp/vader
set rtp+=.
set rtp+=after
filetype plugin indent on
syntax enable