diff options
author | Bram Moolenaar <Bram@vim.org> | 2007-09-25 16:00:00 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2007-09-25 16:00:00 +0000 |
commit | 9d2c8c1a66c2f354f06065d8261ac87e6c407097 (patch) | |
tree | 6dfee2d9b0bb5a1baa1f69bbf761c53f658e4a14 /src/testdir | |
parent | 719939c888fe583419eec652a7cc71172bf3afb1 (diff) |
updated for version 7.1-120v7.1.120
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/Makefile | 8 | ||||
-rw-r--r-- | src/testdir/test14.in | 1 | ||||
-rw-r--r-- | src/testdir/test26.in | 1 | ||||
-rw-r--r-- | src/testdir/test34.in | 10 | ||||
-rw-r--r-- | src/testdir/test45.in | 1 | ||||
-rw-r--r-- | src/testdir/test47.in | 1 | ||||
-rw-r--r-- | src/testdir/test49.in | 20 | ||||
-rw-r--r-- | src/testdir/test55.in | 4 | ||||
-rw-r--r-- | src/testdir/test56.in | 2 | ||||
-rw-r--r-- | src/testdir/test58.in | 5 | ||||
-rw-r--r-- | src/testdir/test59.in | 5 | ||||
-rw-r--r-- | src/testdir/test60.in | 3 | ||||
-rw-r--r-- | src/testdir/test60.vim | 1 | ||||
-rw-r--r-- | src/testdir/test62.in | 2 | ||||
-rw-r--r-- | src/testdir/test63.in | 6 | ||||
-rw-r--r-- | src/testdir/test64.in | 2 |
16 files changed, 63 insertions, 9 deletions
diff --git a/src/testdir/Makefile b/src/testdir/Makefile index 4053665f9e..89a0ca9c18 100644 --- a/src/testdir/Makefile +++ b/src/testdir/Makefile @@ -6,7 +6,7 @@ VIMPROG = ../vim # Uncomment this line for using valgrind. # The output goes into a file "valgrind.$PID" (sorry, no test number). -# VALGRIND = valgrind --tool=memcheck --num-callers=15 --logfile=valgrind +# VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=15 --logfile=valgrind SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \ test7.out test8.out test9.out test10.out test11.out \ @@ -39,7 +39,7 @@ gui: nolog $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) clean: - -rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim test.ok X* viminfo + -rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim test.ok X* valgrind.pid* viminfo test1.out: test1.in -rm -f $*.failed tiny.vim small.vim mbyte.vim test.ok X* viminfo @@ -66,5 +66,9 @@ test1.out: test1.in fi" -rm -rf X* test.ok viminfo +test49.out: test49.vim + +test60.out: test60.vim + nolog: -echo Test results: >test.log diff --git a/src/testdir/test14.in b/src/testdir/test14.in index 57fb9573fe..05c80257b0 100644 --- a/src/testdir/test14.in +++ b/src/testdir/test14.in @@ -18,6 +18,7 @@ vaBiBD:?Bug?,/Piece/-2w! test.out : let tt = "o\<C-V>65\<C-V>x42\<C-V>o103 \<C-V>33a\<C-V>xfg\<C-V>o78\<Esc>" :endif :exe "normal " . tt +:unlet tt :.w >>test.out :set vb /^Piece diff --git a/src/testdir/test26.in b/src/testdir/test26.in index df572c8973..e7cd757661 100644 --- a/src/testdir/test26.in +++ b/src/testdir/test26.in @@ -37,6 +37,7 @@ mt:let i = 0 : endif : endif :endwhile +:unlet i j :'t,$w! test.out :qa! ENDTEST diff --git a/src/testdir/test34.in b/src/testdir/test34.in index 4781fecee6..5eef715006 100644 --- a/src/testdir/test34.in +++ b/src/testdir/test34.in @@ -52,7 +52,15 @@ XX+-XX ---*--- (one (two -[(one again:$-5,$wq! test.out +[(one again:$-5,$w! test.out +:delfunc Table +:delfunc Compute +:delfunc Expr1 +:delfunc Expr2 +:delfunc ListItem +:delfunc ListReset +:unlet retval counter +:q! ENDTEST here diff --git a/src/testdir/test45.in b/src/testdir/test45.in index 58537f33db..cc99149776 100644 --- a/src/testdir/test45.in +++ b/src/testdir/test45.in @@ -55,6 +55,7 @@ endfun /kk$ :call append("$", foldlevel(".")) :/^last/+1,$w! test.out +:delfun Flvl :qa! ENDTEST diff --git a/src/testdir/test47.in b/src/testdir/test47.in index 35bb9f2605..d8384de785 100644 --- a/src/testdir/test47.in +++ b/src/testdir/test47.in @@ -34,6 +34,7 @@ j:let three = three . "-" . winline() :call append("$", two) :call append("$", three) :$-2,$w! test.out +:unlet one two three :qa! ENDTEST diff --git a/src/testdir/test49.in b/src/testdir/test49.in index ec17d21341..22191b21a2 100644 --- a/src/testdir/test49.in +++ b/src/testdir/test49.in @@ -1,13 +1,29 @@ This is a test of the script language. If after adding a new test, the test output doesn't appear properly in -test49.failed, try to add one ore more "G"s at the line before ENDTEST. +test49.failed, try to add one ore more "G"s at the line ending in "test.out" STARTTEST :so small.vim :se nocp nomore viminfo+=nviminfo :so test49.vim -GGGGGGGGGG"rp:.-,$wq! test.out +GGGGGGGGGGGGGG"rp:.-,$w! test.out +:" +:" make valgrind happy +:redir => funclist +:silent func +:redir END +:for line in split(funclist, "\n") +: let name = matchstr(line, 'function \zs[A-Z]\w*\ze(') +: if name != '' +: exe "delfunc " . name +: endif +:endfor +:for v in keys(g:) +: silent! exe "unlet " . v +:endfor +:unlet v +:qa! ENDTEST Results of test49.vim: diff --git a/src/testdir/test55.in b/src/testdir/test55.in index b20c6c4979..22437625ba 100644 --- a/src/testdir/test55.in +++ b/src/testdir/test55.in @@ -345,6 +345,10 @@ let l = [0, 1, 2, 3] :endfun :call Test(1, 2, [3, 4], {5: 6}) " This may take a while :" +:delfunc Test +:unlet dict +:call garbagecollect(1) +:" :/^start:/,$wq! test.out ENDTEST diff --git a/src/testdir/test56.in b/src/testdir/test56.in index 67d66af46d..311a6004ca 100644 --- a/src/testdir/test56.in +++ b/src/testdir/test56.in @@ -17,5 +17,5 @@ endfun fun s:DoNothing() call append(line('$'), "nothing line") endfun -nnoremap <buffer> _x :call <SID>DoNothing()<bar>call <SID>DoLast()<cr> +nnoremap <buffer> _x :call <SID>DoNothing()<bar>call <SID>DoLast()<bar>delfunc <SID>DoNothing<bar>delfunc <SID>DoLast<cr> end: diff --git a/src/testdir/test58.in b/src/testdir/test58.in index 467c7b5573..9600e83f81 100644 --- a/src/testdir/test58.in +++ b/src/testdir/test58.in @@ -86,6 +86,7 @@ gg:/^addstart/+1,/^addend/-1w! Xtest.latin1.add :$put =str `m]s:let [str, a] = spellbadword() :$put =str +:unlet str a :" :" Postponed prefixes :call TestOne('2', '1') @@ -100,6 +101,10 @@ gg:/^addstart/+1,/^addend/-1w! Xtest.latin1.add :" NOSLITSUGS :call TestOne('8', '8') :" +:" clean up for valgrind +:delfunc TestOne +:set spl= enc=latin1 +:" gg:/^test output:/,$wq! test.out ENDTEST diff --git a/src/testdir/test59.in b/src/testdir/test59.in index bd63796835..dcdb62b283 100644 --- a/src/testdir/test59.in +++ b/src/testdir/test59.in @@ -90,6 +90,7 @@ gg:/^addstart/+1,/^addend/-1w! Xtest.utf-8.add :$put =str `m]s:let [str, a] = spellbadword() :$put =str +:unlet str a :" :" Postponed prefixes :call TestOne('2', '1') @@ -101,6 +102,10 @@ gg:/^addstart/+1,/^addend/-1w! Xtest.utf-8.add :call TestOne('6', '6') :call TestOne('7', '7') :" +:" clean up for valgrind +:delfunc TestOne +:set spl= enc=latin1 +:" gg:/^test output:/,$wq! test.out ENDTEST diff --git a/src/testdir/test60.in b/src/testdir/test60.in index d5a0d7c28c..3a5b73ee6e 100644 --- a/src/testdir/test60.in +++ b/src/testdir/test60.in @@ -569,6 +569,9 @@ endfunction redir END endfunction :call TestExists() +:delfunc TestExists +:delfunc RunTest +:delfunc TestFuncArg :edit! test.out :set ff=unix :w diff --git a/src/testdir/test60.vim b/src/testdir/test60.vim index 48eea4279e..f1157f73f9 100644 --- a/src/testdir/test60.vim +++ b/src/testdir/test60.vim @@ -94,4 +94,5 @@ if !exists('*s:my_script_func') else echo "FAILED" endif +unlet str diff --git a/src/testdir/test62.in b/src/testdir/test62.in index e507c6a6b0..83def27c36 100644 --- a/src/testdir/test62.in +++ b/src/testdir/test62.in @@ -7,6 +7,7 @@ STARTTEST :let nr = tabpagenr() :q :call append(line('$'), 'tab page ' . nr) +:unlet nr :" :" Open three tab pages and use ":tabdo" :0tabnew @@ -23,6 +24,7 @@ STARTTEST :q! :call append(line('$'), line1) :call append(line('$'), line2) +:unlet line1 line2 :" :" :/^Results/,$w! test.out diff --git a/src/testdir/test63.in b/src/testdir/test63.in index 10956114c7..74339c3e35 100644 --- a/src/testdir/test63.in +++ b/src/testdir/test63.in @@ -60,7 +60,7 @@ STARTTEST :else : let @r .= "FAILED\n" :endif -:" --- Check that "matchdelete()" returns 0 if succesfull and otherwise -1. +:" --- Check that "matchdelete()" returns 0 if successful and otherwise -1. :let @r .= "*** Test 6: " :let m = matchadd("MyGroup1", "TODO") :let r1 = matchdelete(m) @@ -117,7 +117,7 @@ STARTTEST :" --- Check that "setmatches()" will not add two matches with the same ID. The :" --- expected behaviour (for now) is to add the first match but not the :" --- second and to return 0 (even though it is a matter of debate whether -:" --- this can be considered succesfull behaviour). +:" --- this can be considered successful behaviour). :let @r .= "*** Test 9: " :let r1 = setmatches([{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}, {'group': 'MyGroup2', 'pattern': 'FIXME', 'priority': 10, 'id': 1}]) :if getmatches() == [{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}] && r1 == 0 @@ -127,7 +127,7 @@ STARTTEST :endif :call clearmatches() :unlet r1 -:" --- Check that "setmatches()" returns 0 if succesfull and otherwise -1. +:" --- Check that "setmatches()" returns 0 if successful and otherwise -1. :" --- (A range of valid and invalid input values are tried out to generate the :" --- return values.) :let @r .= "*** Test 10: " diff --git a/src/testdir/test64.in b/src/testdir/test64.in index aa931db645..6e953e0d1d 100644 --- a/src/testdir/test64.in +++ b/src/testdir/test64.in @@ -44,8 +44,10 @@ STARTTEST : $put ='ERROR: pat: \"' . t[0] . '\", text: \"' . t[1] . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"' : endif : endfor +: unlet i : endif :endfor +:unlet t tl e l :/^Results/,$wq! test.out ENDTEST |