mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
DRY quitting vim after each test.
This commit is contained in:
@@ -16,8 +16,6 @@ source helper.vim
|
|||||||
call Setup()
|
call Setup()
|
||||||
|
|
||||||
" test code here
|
" test code here
|
||||||
|
|
||||||
quit!
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- Run the tests.
|
- Run the tests.
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# TODO: exit with non-zero status code when tests fail.
|
# 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
|
rm -f *.out
|
||||||
|
|
||||||
for testcase in test*.vim; do
|
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
|
testname=${testcase%.*} # testFoo
|
||||||
name=${testname:4} # Foo
|
name=${testname:4} # Foo
|
||||||
name="$(tr '[:upper:]' '[:lower:]' <<< ${name:0:1})${name:1}" # foo
|
name="$(tr '[:upper:]' '[:lower:]' <<< ${name:0:1})${name:1}" # foo
|
||||||
|
|||||||
@@ -4,5 +4,3 @@ call Setup()
|
|||||||
normal ggo*
|
normal ggo*
|
||||||
write
|
write
|
||||||
call DumpSigns('addLines')
|
call DumpSigns('addLines')
|
||||||
|
|
||||||
quit!
|
|
||||||
|
|||||||
@@ -4,5 +4,3 @@ call Setup()
|
|||||||
normal ggi*
|
normal ggi*
|
||||||
write
|
write
|
||||||
call DumpSigns('modifyLines')
|
call DumpSigns('modifyLines')
|
||||||
|
|
||||||
quit!
|
|
||||||
|
|||||||
@@ -2,5 +2,3 @@ source helper.vim
|
|||||||
call Setup()
|
call Setup()
|
||||||
|
|
||||||
call DumpSigns('noModifications')
|
call DumpSigns('noModifications')
|
||||||
|
|
||||||
quit!
|
|
||||||
|
|||||||
@@ -6,5 +6,3 @@ write
|
|||||||
execute '6d'
|
execute '6d'
|
||||||
write
|
write
|
||||||
call DumpSigns('orphanedSigns')
|
call DumpSigns('orphanedSigns')
|
||||||
|
|
||||||
quit!
|
|
||||||
|
|||||||
@@ -4,5 +4,3 @@ call Setup()
|
|||||||
execute '1d'
|
execute '1d'
|
||||||
write
|
write
|
||||||
call DumpSigns('removeFirstLines')
|
call DumpSigns('removeFirstLines')
|
||||||
|
|
||||||
quit!
|
|
||||||
|
|||||||
@@ -4,5 +4,3 @@ call Setup()
|
|||||||
execute '5d'
|
execute '5d'
|
||||||
write
|
write
|
||||||
call DumpSigns('removeLines')
|
call DumpSigns('removeLines')
|
||||||
|
|
||||||
quit!
|
|
||||||
|
|||||||
Reference in New Issue
Block a user