DRY quitting vim after each test.

This commit is contained in:
Andy Stewart
2014-11-13 14:28:48 +01:00
parent b9f4173f7c
commit 4ad4c97bb2
8 changed files with 1 additions and 16 deletions

View File

@@ -16,8 +16,6 @@ source helper.vim
call Setup()
" test code here
quit!
```
- Run the tests.

View File

@@ -1,12 +1,11 @@
#!/usr/bin/env bash
# TODO: exit with non-zero status code when tests fail.
# TODO: quit vim after each testcase inside loop below (instead of in testcase).
rm -f *.out
for testcase in test*.vim; do
vim -N -u NONE -S $testcase # testFoo.vim
vim -N -u NONE -S $testcase -c 'quit!' # testFoo.vim
testname=${testcase%.*} # testFoo
name=${testname:4} # Foo
name="$(tr '[:upper:]' '[:lower:]' <<< ${name:0:1})${name:1}" # foo

View File

@@ -4,5 +4,3 @@ call Setup()
normal ggo*
write
call DumpSigns('addLines')
quit!

View File

@@ -4,5 +4,3 @@ call Setup()
normal ggi*
write
call DumpSigns('modifyLines')
quit!

View File

@@ -2,5 +2,3 @@ source helper.vim
call Setup()
call DumpSigns('noModifications')
quit!

View File

@@ -6,5 +6,3 @@ write
execute '6d'
write
call DumpSigns('orphanedSigns')
quit!

View File

@@ -4,5 +4,3 @@ call Setup()
execute '1d'
write
call DumpSigns('removeFirstLines')
quit!

View File

@@ -4,5 +4,3 @@ call Setup()
execute '5d'
write
call DumpSigns('removeLines')
quit!