Karsten Hopp cd4315
To: vim-dev@vim.org
Karsten Hopp cd4315
Subject: patch 7.1.120
Karsten Hopp cd4315
Fcc: outbox
Karsten Hopp cd4315
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp cd4315
Mime-Version: 1.0
Karsten Hopp cd4315
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp cd4315
Content-Transfer-Encoding: 8bit
Karsten Hopp cd4315
------------
Karsten Hopp cd4315
Karsten Hopp cd4315
Patch 7.1.120
Karsten Hopp cd4315
Problem:    Can't properly check memory leaks while running tests.
Karsten Hopp cd4315
Solution:   Add an argument to garbagecollect().  Delete functions and
Karsten Hopp cd4315
	    variables in the test scripts.
Karsten Hopp cd4315
Files:	    runtime/doc/eval.txt, src/eval.c, src/globals.h, src/main.c,
Karsten Hopp cd4315
	    src/testdir/Makefile, src/testdir/test14.in,
Karsten Hopp cd4315
	    src/testdir/test26.in, src/testdir/test34.in,
Karsten Hopp cd4315
	    src/testdir/test45.in, src/testdir/test47.in,
Karsten Hopp cd4315
	    src/testdir/test49.in, src/testdir/test55.in,
Karsten Hopp cd4315
	    src/testdir/test56.in, src/testdir/test58.in,
Karsten Hopp cd4315
	    src/testdir/test59.in, src/testdir/test60.in,
Karsten Hopp cd4315
	    src/testdir/test60.vim, src/testdir/test62.in,
Karsten Hopp cd4315
	    src/testdir/test63.in, src/testdir/test64.in
Karsten Hopp cd4315
Karsten Hopp cd4315
Karsten Hopp cd4315
*** ../vim-7.1.119/runtime/doc/eval.txt	Thu Jul 26 22:55:11 2007
Karsten Hopp cd4315
--- runtime/doc/eval.txt	Tue Sep 25 17:40:30 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 1,4 ****
Karsten Hopp cd4315
! *eval.txt*      For Vim version 7.1.  Last change: 2007 Jul 25
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  		  VIM REFERENCE MANUAL    by Bram Moolenaar
Karsten Hopp cd4315
--- 1,4 ----
Karsten Hopp cd4315
! *eval.txt*      For Vim version 7.1.  Last change: 2007 Sep 25
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  		  VIM REFERENCE MANUAL    by Bram Moolenaar
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 1603,1609 ****
Karsten Hopp cd4315
  foldtextresult( {lnum})		String	text for closed fold at {lnum}
Karsten Hopp cd4315
  foreground( )			Number	bring the Vim window to the foreground
Karsten Hopp cd4315
  function( {name})		Funcref reference to function {name}
Karsten Hopp cd4315
! garbagecollect()		none	free memory, breaking cyclic references
Karsten Hopp cd4315
  get( {list}, {idx} [, {def}])	any	get item {idx} from {list} or {def}
Karsten Hopp cd4315
  get( {dict}, {key} [, {def}])	any	get item {key} from {dict} or {def}
Karsten Hopp cd4315
  getbufline( {expr}, {lnum} [, {end}])
Karsten Hopp cd4315
--- 1603,1609 ----
Karsten Hopp cd4315
  foldtextresult( {lnum})		String	text for closed fold at {lnum}
Karsten Hopp cd4315
  foreground( )			Number	bring the Vim window to the foreground
Karsten Hopp cd4315
  function( {name})		Funcref reference to function {name}
Karsten Hopp cd4315
! garbagecollect( [at_exit])	none	free memory, breaking cyclic references
Karsten Hopp cd4315
  get( {list}, {idx} [, {def}])	any	get item {idx} from {list} or {def}
Karsten Hopp cd4315
  get( {dict}, {key} [, {def}])	any	get item {key} from {dict} or {def}
Karsten Hopp cd4315
  getbufline( {expr}, {lnum} [, {end}])
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 2673,2679 ****
Karsten Hopp cd4315
  		{name} can be a user defined function or an internal function.
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  
Karsten Hopp cd4315
! garbagecollect()					*garbagecollect()*
Karsten Hopp cd4315
  		Cleanup unused |Lists| and |Dictionaries| that have circular
Karsten Hopp cd4315
  		references.  There is hardly ever a need to invoke this
Karsten Hopp cd4315
  		function, as it is automatically done when Vim runs out of
Karsten Hopp cd4315
--- 2673,2679 ----
Karsten Hopp cd4315
  		{name} can be a user defined function or an internal function.
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  
Karsten Hopp cd4315
! garbagecollect([at_exit])				*garbagecollect()*
Karsten Hopp cd4315
  		Cleanup unused |Lists| and |Dictionaries| that have circular
Karsten Hopp cd4315
  		references.  There is hardly ever a need to invoke this
Karsten Hopp cd4315
  		function, as it is automatically done when Vim runs out of
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 2683,2688 ****
Karsten Hopp cd4315
--- 2683,2691 ----
Karsten Hopp cd4315
  		This is useful if you have deleted a very big |List| and/or
Karsten Hopp cd4315
  		|Dictionary| with circular references in a script that runs
Karsten Hopp cd4315
  		for a long time.
Karsten Hopp cd4315
+ 		When the optional "at_exit" argument is one, garbage
Karsten Hopp cd4315
+ 		collection will also be done when exiting Vim, if it wasn't
Karsten Hopp cd4315
+ 		done before.  This is useful when checking for memory leaks.
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  get({list}, {idx} [, {default}])			*get()*
Karsten Hopp cd4315
  		Get item {idx} from |List| {list}.  When this item is not
Karsten Hopp cd4315
*** ../vim-7.1.119/src/eval.c	Tue Sep 25 12:50:00 2007
Karsten Hopp cd4315
--- src/eval.c	Sun Sep 16 19:24:49 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 6128,6133 ****
Karsten Hopp cd4315
--- 6128,6134 ----
Karsten Hopp cd4315
      /* Only do this once. */
Karsten Hopp cd4315
      want_garbage_collect = FALSE;
Karsten Hopp cd4315
      may_garbage_collect = FALSE;
Karsten Hopp cd4315
+     garbage_collect_at_exit = FALSE;
Karsten Hopp cd4315
  
Karsten Hopp cd4315
      /*
Karsten Hopp cd4315
       * 1. Go through all accessible variables and mark all lists and dicts
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 7110,7116 ****
Karsten Hopp cd4315
      {"foldtextresult",	1, 1, f_foldtextresult},
Karsten Hopp cd4315
      {"foreground",	0, 0, f_foreground},
Karsten Hopp cd4315
      {"function",	1, 1, f_function},
Karsten Hopp cd4315
!     {"garbagecollect",	0, 0, f_garbagecollect},
Karsten Hopp cd4315
      {"get",		2, 3, f_get},
Karsten Hopp cd4315
      {"getbufline",	2, 3, f_getbufline},
Karsten Hopp cd4315
      {"getbufvar",	2, 2, f_getbufvar},
Karsten Hopp cd4315
--- 7111,7117 ----
Karsten Hopp cd4315
      {"foldtextresult",	1, 1, f_foldtextresult},
Karsten Hopp cd4315
      {"foreground",	0, 0, f_foreground},
Karsten Hopp cd4315
      {"function",	1, 1, f_function},
Karsten Hopp cd4315
!     {"garbagecollect",	0, 1, f_garbagecollect},
Karsten Hopp cd4315
      {"get",		2, 3, f_get},
Karsten Hopp cd4315
      {"getbufline",	2, 3, f_getbufline},
Karsten Hopp cd4315
      {"getbufvar",	2, 2, f_getbufvar},
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 9719,9724 ****
Karsten Hopp cd4315
--- 9720,9728 ----
Karsten Hopp cd4315
      /* This is postponed until we are back at the toplevel, because we may be
Karsten Hopp cd4315
       * using Lists and Dicts internally.  E.g.: ":echo [garbagecollect()]". */
Karsten Hopp cd4315
      want_garbage_collect = TRUE;
Karsten Hopp cd4315
+ 
Karsten Hopp cd4315
+     if (argvars[0].v_type != VAR_UNKNOWN && get_tv_number(&argvars[0]) == 1)
Karsten Hopp cd4315
+ 	garbage_collect_at_exit = TRUE;
Karsten Hopp cd4315
  }
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  /*
Karsten Hopp cd4315
*** ../vim-7.1.119/src/globals.h	Thu Aug 30 13:51:52 2007
Karsten Hopp cd4315
--- src/globals.h	Sun Sep 16 18:42:41 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 301,313 ****
Karsten Hopp cd4315
  #endif
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  #ifdef FEAT_EVAL
Karsten Hopp cd4315
! /* Garbage collection can only take place when we are sure there are no Lists
Karsten Hopp cd4315
   * or Dictionaries being used internally.  This is flagged with
Karsten Hopp cd4315
   * "may_garbage_collect" when we are at the toplevel.
Karsten Hopp cd4315
   * "want_garbage_collect" is set by the garbagecollect() function, which means
Karsten Hopp cd4315
!  * we do garbage collection before waiting for a char at the toplevel. */
Karsten Hopp cd4315
  EXTERN int	may_garbage_collect INIT(= FALSE);
Karsten Hopp cd4315
  EXTERN int	want_garbage_collect INIT(= FALSE);
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  /* ID of script being sourced or was sourced to define the current function. */
Karsten Hopp cd4315
  EXTERN scid_T	current_SID INIT(= 0);
Karsten Hopp cd4315
--- 301,317 ----
Karsten Hopp cd4315
  #endif
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  #ifdef FEAT_EVAL
Karsten Hopp cd4315
! /*
Karsten Hopp cd4315
!  * Garbage collection can only take place when we are sure there are no Lists
Karsten Hopp cd4315
   * or Dictionaries being used internally.  This is flagged with
Karsten Hopp cd4315
   * "may_garbage_collect" when we are at the toplevel.
Karsten Hopp cd4315
   * "want_garbage_collect" is set by the garbagecollect() function, which means
Karsten Hopp cd4315
!  * we do garbage collection before waiting for a char at the toplevel.
Karsten Hopp cd4315
!  * "garbage_collect_at_exit" indicates garbagecollect(1) was called.
Karsten Hopp cd4315
!  */
Karsten Hopp cd4315
  EXTERN int	may_garbage_collect INIT(= FALSE);
Karsten Hopp cd4315
  EXTERN int	want_garbage_collect INIT(= FALSE);
Karsten Hopp cd4315
+ EXTERN int	garbage_collect_at_exit INIT(= FALSE);
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  /* ID of script being sourced or was sourced to define the current function. */
Karsten Hopp cd4315
  EXTERN scid_T	current_SID INIT(= 0);
Karsten Hopp cd4315
*** ../vim-7.1.119/src/main.c	Thu Sep  6 17:38:06 2007
Karsten Hopp cd4315
--- src/main.c	Sun Sep 16 18:44:54 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 1334,1339 ****
Karsten Hopp cd4315
--- 1334,1343 ----
Karsten Hopp cd4315
  #ifdef FEAT_CSCOPE
Karsten Hopp cd4315
      cs_end();
Karsten Hopp cd4315
  #endif
Karsten Hopp cd4315
+ #ifdef FEAT_EVAL
Karsten Hopp cd4315
+     if (garbage_collect_at_exit)
Karsten Hopp cd4315
+ 	garbage_collect();
Karsten Hopp cd4315
+ #endif
Karsten Hopp cd4315
  
Karsten Hopp cd4315
      mch_exit(exitval);
Karsten Hopp cd4315
  }
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/Makefile	Tue Aug 14 17:28:14 2007
Karsten Hopp cd4315
--- src/testdir/Makefile	Mon Sep 17 20:04:13 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 6,12 ****
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  # Uncomment this line for using valgrind.
Karsten Hopp cd4315
  # The output goes into a file "valgrind.$PID" (sorry, no test number).
Karsten Hopp cd4315
! # VALGRIND = valgrind --tool=memcheck --num-callers=15 --logfile=valgrind
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
Karsten Hopp cd4315
  		test7.out test8.out test9.out test10.out test11.out \
Karsten Hopp cd4315
--- 6,12 ----
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  # Uncomment this line for using valgrind.
Karsten Hopp cd4315
  # The output goes into a file "valgrind.$PID" (sorry, no test number).
Karsten Hopp cd4315
! # VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=15 --logfile=valgrind
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
Karsten Hopp cd4315
  		test7.out test8.out test9.out test10.out test11.out \
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 39,45 ****
Karsten Hopp cd4315
  $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG)
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  clean:
Karsten Hopp cd4315
! 	-rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim test.ok X* viminfo
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  test1.out: test1.in
Karsten Hopp cd4315
  	-rm -f $*.failed tiny.vim small.vim mbyte.vim test.ok X* viminfo
Karsten Hopp cd4315
--- 39,45 ----
Karsten Hopp cd4315
  $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG)
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  clean:
Karsten Hopp cd4315
! 	-rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim test.ok X* valgrind.pid* viminfo
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  test1.out: test1.in
Karsten Hopp cd4315
  	-rm -f $*.failed tiny.vim small.vim mbyte.vim test.ok X* viminfo
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 65,70 ****
Karsten Hopp cd4315
--- 65,74 ----
Karsten Hopp cd4315
  		else echo $* NO OUTPUT >>test.log; \
Karsten Hopp cd4315
  		fi"
Karsten Hopp cd4315
  	-rm -rf X* test.ok viminfo
Karsten Hopp cd4315
+ 
Karsten Hopp cd4315
+ test49.out: test49.vim
Karsten Hopp cd4315
+ 
Karsten Hopp cd4315
+ test60.out: test60.vim
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  nolog:
Karsten Hopp cd4315
  	-echo Test results: >test.log
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test14.in	Sun Jun 13 20:24:08 2004
Karsten Hopp cd4315
--- src/testdir/test14.in	Sun Sep 16 15:57:54 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 18,23 ****
Karsten Hopp cd4315
--- 18,24 ----
Karsten Hopp cd4315
  : let tt = "o\<C-V>65\<C-V>x42\<C-V>o103 \<C-V>33a\<C-V>xfg\<C-V>o78\<Esc>"
Karsten Hopp cd4315
  :endif
Karsten Hopp cd4315
  :exe "normal " . tt
Karsten Hopp cd4315
+ :unlet tt
Karsten Hopp cd4315
  :.w >>test.out
Karsten Hopp cd4315
  :set vb
Karsten Hopp cd4315
  /^Piece
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test26.in	Sun Jun 13 17:05:48 2004
Karsten Hopp cd4315
--- src/testdir/test26.in	Sun Sep 16 16:54:19 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 37,42 ****
Karsten Hopp cd4315
--- 37,43 ----
Karsten Hopp cd4315
  :    endif
Karsten Hopp cd4315
  :  endif
Karsten Hopp cd4315
  :endwhile
Karsten Hopp cd4315
+ :unlet i j
Karsten Hopp cd4315
  :'t,$w! test.out
Karsten Hopp cd4315
  :qa!
Karsten Hopp cd4315
  ENDTEST
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test34.in	Sun Apr 30 20:46:14 2006
Karsten Hopp cd4315
--- src/testdir/test34.in	Sun Sep 16 21:25:47 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 52,58 ****
Karsten Hopp cd4315
  ---*---
Karsten Hopp cd4315
  (one
Karsten Hopp cd4315
  (two
Karsten Hopp cd4315
! [(one again?:$-5,$wq! test.out
Karsten Hopp cd4315
  ENDTEST
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  here
Karsten Hopp cd4315
--- 52,66 ----
Karsten Hopp cd4315
  ---*---
Karsten Hopp cd4315
  (one
Karsten Hopp cd4315
  (two
Karsten Hopp cd4315
! [(one again?:$-5,$w! test.out
Karsten Hopp cd4315
! :delfunc Table
Karsten Hopp cd4315
! :delfunc Compute
Karsten Hopp cd4315
! :delfunc Expr1
Karsten Hopp cd4315
! :delfunc Expr2
Karsten Hopp cd4315
! :delfunc ListItem
Karsten Hopp cd4315
! :delfunc ListReset
Karsten Hopp cd4315
! :unlet retval counter
Karsten Hopp cd4315
! :q!
Karsten Hopp cd4315
  ENDTEST
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  here
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test45.in	Sun Jun 13 19:57:02 2004
Karsten Hopp cd4315
--- src/testdir/test45.in	Sun Sep 16 18:27:20 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 55,60 ****
Karsten Hopp cd4315
--- 55,61 ----
Karsten Hopp cd4315
  /kk$
Karsten Hopp cd4315
  :call append("$", foldlevel("."))
Karsten Hopp cd4315
  :/^last/+1,$w! test.out
Karsten Hopp cd4315
+ :delfun Flvl
Karsten Hopp cd4315
  :qa!
Karsten Hopp cd4315
  ENDTEST
Karsten Hopp cd4315
  
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test47.in	Sun Jun 13 18:40:29 2004
Karsten Hopp cd4315
--- src/testdir/test47.in	Sun Sep 16 18:32:03 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 34,39 ****
Karsten Hopp cd4315
--- 34,40 ----
Karsten Hopp cd4315
  :call append("$", two)
Karsten Hopp cd4315
  :call append("$", three)
Karsten Hopp cd4315
  :$-2,$w! test.out
Karsten Hopp cd4315
+ :unlet one two three
Karsten Hopp cd4315
  :qa!
Karsten Hopp cd4315
  ENDTEST
Karsten Hopp cd4315
  
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test49.in	Sun Jun 13 18:10:00 2004
Karsten Hopp cd4315
--- src/testdir/test49.in	Sun Sep 16 23:30:35 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 1,13 ****
Karsten Hopp cd4315
  This is a test of the script language.
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  If after adding a new test, the test output doesn't appear properly in
Karsten Hopp cd4315
! test49.failed, try to add one ore more "G"s at the line before ENDTEST.
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  STARTTEST
Karsten Hopp cd4315
  :so small.vim
Karsten Hopp cd4315
  :se nocp nomore viminfo+=nviminfo
Karsten Hopp cd4315
  :so test49.vim
Karsten Hopp cd4315
! GGGGGGGGGG"rp:.-,$wq! test.out
Karsten Hopp cd4315
  ENDTEST
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  Results of test49.vim:
Karsten Hopp cd4315
--- 1,29 ----
Karsten Hopp cd4315
  This is a test of the script language.
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  If after adding a new test, the test output doesn't appear properly in
Karsten Hopp cd4315
! test49.failed, try to add one ore more "G"s at the line ending in "test.out"
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  STARTTEST
Karsten Hopp cd4315
  :so small.vim
Karsten Hopp cd4315
  :se nocp nomore viminfo+=nviminfo
Karsten Hopp cd4315
  :so test49.vim
Karsten Hopp cd4315
! GGGGGGGGGGGGGG"rp:.-,$w! test.out
Karsten Hopp cd4315
! :"
Karsten Hopp cd4315
! :" make valgrind happy
Karsten Hopp cd4315
! :redir => funclist
Karsten Hopp cd4315
! :silent func
Karsten Hopp cd4315
! :redir END
Karsten Hopp cd4315
! :for line in split(funclist, "\n")
Karsten Hopp cd4315
! :  let name = matchstr(line, 'function \zs[A-Z]\w*\ze(')
Karsten Hopp cd4315
! :  if name != ''
Karsten Hopp cd4315
! :    exe "delfunc " . name
Karsten Hopp cd4315
! :  endif
Karsten Hopp cd4315
! :endfor
Karsten Hopp cd4315
! :for v in keys(g:)
Karsten Hopp cd4315
! :  silent! exe "unlet " . v
Karsten Hopp cd4315
! :endfor
Karsten Hopp cd4315
! :unlet v
Karsten Hopp cd4315
! :qa!
Karsten Hopp cd4315
  ENDTEST
Karsten Hopp cd4315
  
Karsten Hopp cd4315
  Results of test49.vim:
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test55.in	Sat May  5 20:03:56 2007
Karsten Hopp cd4315
--- src/testdir/test55.in	Mon Sep 17 19:53:48 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 345,350 ****
Karsten Hopp cd4315
--- 345,354 ----
Karsten Hopp cd4315
  :endfun
Karsten Hopp cd4315
  :call Test(1, 2, [3, 4], {5: 6})  " This may take a while
Karsten Hopp cd4315
  :"
Karsten Hopp cd4315
+ :delfunc Test
Karsten Hopp cd4315
+ :unlet dict
Karsten Hopp cd4315
+ :call garbagecollect(1)
Karsten Hopp cd4315
+ :"
Karsten Hopp cd4315
  :/^start:/,$wq! test.out
Karsten Hopp cd4315
  ENDTEST
Karsten Hopp cd4315
  
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test56.in	Tue Sep  5 13:36:02 2006
Karsten Hopp cd4315
--- src/testdir/test56.in	Sun Sep 16 17:54:20 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 17,21 ****
Karsten Hopp cd4315
  fun s:DoNothing()
Karsten Hopp cd4315
    call append(line('$'), "nothing line")
Karsten Hopp cd4315
  endfun
Karsten Hopp cd4315
! nnoremap <buffer> _x	:call <SID>DoNothing()<bar>call <SID>DoLast()<cr>
Karsten Hopp cd4315
  end:
Karsten Hopp cd4315
--- 17,21 ----
Karsten Hopp cd4315
  fun s:DoNothing()
Karsten Hopp cd4315
    call append(line('$'), "nothing line")
Karsten Hopp cd4315
  endfun
Karsten Hopp cd4315
! nnoremap <buffer> _x	:call <SID>DoNothing()<bar>call <SID>DoLast()<bar>delfunc <SID>DoNothing<bar>delfunc <SID>DoLast<cr>
Karsten Hopp cd4315
  end:
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test58.in	Wed Apr  5 22:38:56 2006
Karsten Hopp cd4315
--- src/testdir/test58.in	Sun Sep 16 18:17:03 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 86,91 ****
Karsten Hopp cd4315
--- 86,92 ----
Karsten Hopp cd4315
  :$put =str
Karsten Hopp cd4315
  `m]s:let [str, a] = spellbadword()
Karsten Hopp cd4315
  :$put =str
Karsten Hopp cd4315
+ :unlet str a
Karsten Hopp cd4315
  :"
Karsten Hopp cd4315
  :" Postponed prefixes
Karsten Hopp cd4315
  :call TestOne('2', '1')
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 99,104 ****
Karsten Hopp cd4315
--- 100,109 ----
Karsten Hopp cd4315
  :"
Karsten Hopp cd4315
  :" NOSLITSUGS
Karsten Hopp cd4315
  :call TestOne('8', '8')
Karsten Hopp cd4315
+ :"
Karsten Hopp cd4315
+ :" clean up for valgrind
Karsten Hopp cd4315
+ :delfunc TestOne
Karsten Hopp cd4315
+ :set spl= enc=latin1
Karsten Hopp cd4315
  :"
Karsten Hopp cd4315
  gg:/^test output:/,$wq! test.out
Karsten Hopp cd4315
  ENDTEST
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test59.in	Wed Apr  5 22:27:11 2006
Karsten Hopp cd4315
--- src/testdir/test59.in	Sun Sep 16 18:17:23 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 90,95 ****
Karsten Hopp cd4315
--- 90,96 ----
Karsten Hopp cd4315
  :$put =str
Karsten Hopp cd4315
  `m]s:let [str, a] = spellbadword()
Karsten Hopp cd4315
  :$put =str
Karsten Hopp cd4315
+ :unlet str a
Karsten Hopp cd4315
  :"
Karsten Hopp cd4315
  :" Postponed prefixes
Karsten Hopp cd4315
  :call TestOne('2', '1')
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 100,105 ****
Karsten Hopp cd4315
--- 101,110 ----
Karsten Hopp cd4315
  :call TestOne('5', '5')
Karsten Hopp cd4315
  :call TestOne('6', '6')
Karsten Hopp cd4315
  :call TestOne('7', '7')
Karsten Hopp cd4315
+ :"
Karsten Hopp cd4315
+ :" clean up for valgrind
Karsten Hopp cd4315
+ :delfunc TestOne
Karsten Hopp cd4315
+ :set spl= enc=latin1
Karsten Hopp cd4315
  :"
Karsten Hopp cd4315
  gg:/^test output:/,$wq! test.out
Karsten Hopp cd4315
  ENDTEST
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test60.in	Fri May  5 23:11:11 2006
Karsten Hopp cd4315
--- src/testdir/test60.in	Mon Sep 17 19:58:43 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 569,574 ****
Karsten Hopp cd4315
--- 569,577 ----
Karsten Hopp cd4315
      redir END
Karsten Hopp cd4315
  endfunction
Karsten Hopp cd4315
  :call TestExists()
Karsten Hopp cd4315
+ :delfunc TestExists
Karsten Hopp cd4315
+ :delfunc RunTest
Karsten Hopp cd4315
+ :delfunc TestFuncArg
Karsten Hopp cd4315
  :edit! test.out
Karsten Hopp cd4315
  :set ff=unix
Karsten Hopp cd4315
  :w
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test60.vim	Fri Jan 13 00:14:55 2006
Karsten Hopp cd4315
--- src/testdir/test60.vim	Mon Sep 17 19:56:02 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 94,97 ****
Karsten Hopp cd4315
--- 94,98 ----
Karsten Hopp cd4315
  else
Karsten Hopp cd4315
      echo "FAILED"
Karsten Hopp cd4315
  endif
Karsten Hopp cd4315
+ unlet str
Karsten Hopp cd4315
  
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test62.in	Sun Apr 30 20:28:14 2006
Karsten Hopp cd4315
--- src/testdir/test62.in	Sun Sep 16 17:24:04 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 7,12 ****
Karsten Hopp cd4315
--- 7,13 ----
Karsten Hopp cd4315
  :let nr = tabpagenr()
Karsten Hopp cd4315
  :q
Karsten Hopp cd4315
  :call append(line('$'), 'tab page ' . nr)
Karsten Hopp cd4315
+ :unlet nr
Karsten Hopp cd4315
  :"
Karsten Hopp cd4315
  :" Open three tab pages and use ":tabdo"
Karsten Hopp cd4315
  :0tabnew
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 23,28 ****
Karsten Hopp cd4315
--- 24,30 ----
Karsten Hopp cd4315
  :q!
Karsten Hopp cd4315
  :call append(line('$'), line1)
Karsten Hopp cd4315
  :call append(line('$'), line2)
Karsten Hopp cd4315
+ :unlet line1 line2
Karsten Hopp cd4315
  :"
Karsten Hopp cd4315
  :"
Karsten Hopp cd4315
  :/^Results/,$w! test.out
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test63.in	Thu Jul 26 22:55:11 2007
Karsten Hopp cd4315
--- src/testdir/test63.in	Sun Sep 16 17:11:07 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 60,66 ****
Karsten Hopp cd4315
  :else
Karsten Hopp cd4315
  :  let @r .= "FAILED\n"
Karsten Hopp cd4315
  :endif
Karsten Hopp cd4315
! :" --- Check that "matchdelete()" returns 0 if succesfull and otherwise -1.
Karsten Hopp cd4315
  :let @r .= "*** Test 6: "
Karsten Hopp cd4315
  :let m = matchadd("MyGroup1", "TODO")
Karsten Hopp cd4315
  :let r1 = matchdelete(m)
Karsten Hopp cd4315
--- 60,66 ----
Karsten Hopp cd4315
  :else
Karsten Hopp cd4315
  :  let @r .= "FAILED\n"
Karsten Hopp cd4315
  :endif
Karsten Hopp cd4315
! :" --- Check that "matchdelete()" returns 0 if successful and otherwise -1.
Karsten Hopp cd4315
  :let @r .= "*** Test 6: "
Karsten Hopp cd4315
  :let m = matchadd("MyGroup1", "TODO")
Karsten Hopp cd4315
  :let r1 = matchdelete(m)
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 117,123 ****
Karsten Hopp cd4315
  :" --- Check that "setmatches()" will not add two matches with the same ID. The
Karsten Hopp cd4315
  :" --- expected behaviour (for now) is to add the first match but not the
Karsten Hopp cd4315
  :" --- second and to return 0 (even though it is a matter of debate whether
Karsten Hopp cd4315
! :" --- this can be considered succesfull behaviour).
Karsten Hopp cd4315
  :let @r .= "*** Test 9: "
Karsten Hopp cd4315
  :let r1 = setmatches([{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}, {'group': 'MyGroup2', 'pattern': 'FIXME', 'priority': 10, 'id': 1}])
Karsten Hopp cd4315
  :if getmatches() == [{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}] && r1 == 0
Karsten Hopp cd4315
--- 117,123 ----
Karsten Hopp cd4315
  :" --- Check that "setmatches()" will not add two matches with the same ID. The
Karsten Hopp cd4315
  :" --- expected behaviour (for now) is to add the first match but not the
Karsten Hopp cd4315
  :" --- second and to return 0 (even though it is a matter of debate whether
Karsten Hopp cd4315
! :" --- this can be considered successful behaviour).
Karsten Hopp cd4315
  :let @r .= "*** Test 9: "
Karsten Hopp cd4315
  :let r1 = setmatches([{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}, {'group': 'MyGroup2', 'pattern': 'FIXME', 'priority': 10, 'id': 1}])
Karsten Hopp cd4315
  :if getmatches() == [{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}] && r1 == 0
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 127,133 ****
Karsten Hopp cd4315
  :endif
Karsten Hopp cd4315
  :call clearmatches()
Karsten Hopp cd4315
  :unlet r1
Karsten Hopp cd4315
! :" --- Check that "setmatches()" returns 0 if succesfull and otherwise -1.
Karsten Hopp cd4315
  :" --- (A range of valid and invalid input values are tried out to generate the
Karsten Hopp cd4315
  :" --- return values.)
Karsten Hopp cd4315
  :let @r .= "*** Test 10: "
Karsten Hopp cd4315
--- 127,133 ----
Karsten Hopp cd4315
  :endif
Karsten Hopp cd4315
  :call clearmatches()
Karsten Hopp cd4315
  :unlet r1
Karsten Hopp cd4315
! :" --- Check that "setmatches()" returns 0 if successful and otherwise -1.
Karsten Hopp cd4315
  :" --- (A range of valid and invalid input values are tried out to generate the
Karsten Hopp cd4315
  :" --- return values.)
Karsten Hopp cd4315
  :let @r .= "*** Test 10: "
Karsten Hopp cd4315
*** ../vim-7.1.119/src/testdir/test64.in	Tue Aug 14 17:28:14 2007
Karsten Hopp cd4315
--- src/testdir/test64.in	Sun Sep 16 17:43:03 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 44,51 ****
Karsten Hopp cd4315
--- 44,53 ----
Karsten Hopp cd4315
  :        $put ='ERROR: pat: \"' . t[0] . '\", text: \"' . t[1] . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"'
Karsten Hopp cd4315
  :      endif
Karsten Hopp cd4315
  :    endfor
Karsten Hopp cd4315
+ :    unlet i
Karsten Hopp cd4315
  :  endif
Karsten Hopp cd4315
  :endfor
Karsten Hopp cd4315
+ :unlet t tl e l
Karsten Hopp cd4315
  :/^Results/,$wq! test.out
Karsten Hopp cd4315
  ENDTEST
Karsten Hopp cd4315
  
Karsten Hopp cd4315
*** ../vim-7.1.119/src/version.c	Tue Sep 25 14:50:19 2007
Karsten Hopp cd4315
--- src/version.c	Tue Sep 25 17:36:22 2007
Karsten Hopp cd4315
***************
Karsten Hopp cd4315
*** 668,669 ****
Karsten Hopp cd4315
--- 668,671 ----
Karsten Hopp cd4315
  {   /* Add new patch number below this line */
Karsten Hopp cd4315
+ /**/
Karsten Hopp cd4315
+     120,
Karsten Hopp cd4315
  /**/
Karsten Hopp cd4315
Karsten Hopp cd4315
-- 
Karsten Hopp cd4315
BEDEVERE: How do you know so much about swallows?
Karsten Hopp cd4315
ARTHUR:   Well you have to know these things when you're a king, you know.
Karsten Hopp cd4315
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp cd4315
Karsten Hopp cd4315
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp cd4315
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp cd4315
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp cd4315
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///