Tests: improve formatting of output

This commit is contained in:
Marco Hinz 2016-02-03 14:51:54 +01:00
parent 826b0f03e0
commit b0d90b1f76
4 changed files with 23 additions and 29 deletions

View file

@ -1,18 +1,19 @@
Execute (Session: :SSave foo):
Execute (:SSave foo | SClose):
edit include/testfile.txt
SSave foo
SClose
Do:
e
Expect:
Do (q):
q
Expect (<blank>):
Execute (Session: :SLoad foo):
silent SLoad foo
Expect:
Execute (:SLoad foo):
SLoad foo
Expect (textfile.txt):
This is just a simple test file.
Foo, bar, quux.
Execute (Session: :SDelete! foo):
Assert 1 == filereadable(g:startify_session_dir.'/foo')
AssertEqual filereadable(g:startify_session_dir.'/foo'), 1
SDelete! foo
Assert 0 == filereadable(g:startify_session_dir.'/foo')
AssertEqual filereadable(g:startify_session_dir.'/foo'), 0

View file

@ -2,23 +2,23 @@ Before:
Startify
doautocmd CursorMoved
Execute (Syntax: between brackets -> StartifyNumber):
Assert SyntaxAt() == 'StartifyNumber'
Execute (Between brackets -> StartifyNumber):
AssertEqual SyntaxAt(), 'StartifyNumber'
Execute (Syntax: brackets -> StartifyBracket):
Assert SyntaxAt(3) == 'StartifyBracket'
Execute (Brackets -> StartifyBracket):
AssertEqual SyntaxAt(3), 'StartifyBracket'
Execute (Syntax: first entry -> StartifySpecial):
Assert SyntaxAt(9) == 'StartifySpecial'
Execute (First entry -> StartifySpecial):
AssertEqual SyntaxAt(9), 'StartifySpecial'
Execute (Syntax: section header -> StartifySection):
Execute (Section header -> StartifySection):
normal! 2j
Assert SyntaxAt(9) == 'StartifySection'
AssertEqual SyntaxAt(9), 'StartifySection'
Execute (Syntax: second entry (separator) -> StartifySlash):
Execute (Second entry (separator) -> StartifySlash):
normal! 4j
Assert SyntaxAt(9) == 'StartifySlash'
AssertEqual SyntaxAt(9), 'StartifySlash'
Execute (Syntax: second entry (path) -> StartifyFile):
Execute (Second entry (path) -> StartifyFile):
normal! 4j
Assert SyntaxAt(10) == 'StartifyFile'
AssertEqual SyntaxAt(10), 'StartifyFile'

View file

@ -21,4 +21,4 @@ cp viminfo viminfo.tmp
trap "{ rm viminfo.tmp; }" EXIT
echo '(Be patient.. testing can take a while.)'
HOME=/dev/null vim -XNu vimrc -i viminfo.tmp -c 'Vader! vader.vader'
HOME=/dev/null vim -XNu vimrc -i viminfo.tmp -c 'Vader! feature/*.vader'

View file

@ -1,7 +0,0 @@
Execute (:Startify command available):
Assert 2 == exists(':Startify')
Include: feature/buffer.vader
Include: feature/mapping.vader
Include: feature/session.vader
Include: feature/syntax.vader