mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:40:05 +08:00
Add test
This commit is contained in:
parent
364c73c0fb
commit
fbf89590a9
10
.travis.yml
10
.travis.yml
@ -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
21
test/test.vader
Normal 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
6
test/test.vim
Normal file
@ -0,0 +1,6 @@
|
||||
filetype off
|
||||
set rtp+=/tmp/vader
|
||||
set rtp+=.
|
||||
set rtp+=after
|
||||
filetype plugin indent on
|
||||
syntax enable
|
Loading…
Reference in New Issue
Block a user