From 4ad4c97bb282c863bc160decb1e61d840e86c502 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Thu, 13 Nov 2014 14:28:48 +0100 Subject: [PATCH] DRY quitting vim after each test. --- test/README.markdown | 2 -- test/test.sh | 3 +-- test/testAddLines.vim | 2 -- test/testModifyLines.vim | 2 -- test/testNoModifications.vim | 2 -- test/testOrphanedSigns.vim | 2 -- test/testRemoveFirstLines.vim | 2 -- test/testRemoveLines.vim | 2 -- 8 files changed, 1 insertion(+), 16 deletions(-) diff --git a/test/README.markdown b/test/README.markdown index afa3188..b3128de 100644 --- a/test/README.markdown +++ b/test/README.markdown @@ -16,8 +16,6 @@ source helper.vim call Setup() " test code here - -quit! ``` - Run the tests. diff --git a/test/test.sh b/test/test.sh index fd585a8..9ebfd1e 100755 --- a/test/test.sh +++ b/test/test.sh @@ -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 diff --git a/test/testAddLines.vim b/test/testAddLines.vim index 6c2bad3..6b0ec4a 100644 --- a/test/testAddLines.vim +++ b/test/testAddLines.vim @@ -4,5 +4,3 @@ call Setup() normal ggo* write call DumpSigns('addLines') - -quit! diff --git a/test/testModifyLines.vim b/test/testModifyLines.vim index d549404..d4a3d01 100644 --- a/test/testModifyLines.vim +++ b/test/testModifyLines.vim @@ -4,5 +4,3 @@ call Setup() normal ggi* write call DumpSigns('modifyLines') - -quit! diff --git a/test/testNoModifications.vim b/test/testNoModifications.vim index 9ca295c..909639f 100644 --- a/test/testNoModifications.vim +++ b/test/testNoModifications.vim @@ -2,5 +2,3 @@ source helper.vim call Setup() call DumpSigns('noModifications') - -quit! diff --git a/test/testOrphanedSigns.vim b/test/testOrphanedSigns.vim index 6659f04..35992d2 100644 --- a/test/testOrphanedSigns.vim +++ b/test/testOrphanedSigns.vim @@ -6,5 +6,3 @@ write execute '6d' write call DumpSigns('orphanedSigns') - -quit! diff --git a/test/testRemoveFirstLines.vim b/test/testRemoveFirstLines.vim index 42f019d..4a29a73 100644 --- a/test/testRemoveFirstLines.vim +++ b/test/testRemoveFirstLines.vim @@ -4,5 +4,3 @@ call Setup() execute '1d' write call DumpSigns('removeFirstLines') - -quit! diff --git a/test/testRemoveLines.vim b/test/testRemoveLines.vim index 032f9d1..23d672b 100644 --- a/test/testRemoveLines.vim +++ b/test/testRemoveLines.vim @@ -4,5 +4,3 @@ call Setup() execute '5d' write call DumpSigns('removeLines') - -quit!