File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -430,11 +430,12 @@ eval_clear(void)
430430 vim_free (SCRIPT_SV (i ));
431431 ga_clear (& ga_scripts );
432432
433- /* unreferenced lists and dicts */
434- (void )garbage_collect (FALSE);
435-
436- /* functions */
433+ // functions need to be freed before gargabe collecting, otherwise local
434+ // variables might be freed twice.
437435 free_all_functions ();
436+
437+ // unreferenced lists and dicts
438+ (void )garbage_collect (FALSE);
438439}
439440#endif
440441
Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ if &lines < 24 || &columns < 80
4242 cquit
4343endif
4444
45+ if has (' reltime' )
46+ let s: start_time = reltime ()
47+ endif
48+
4549" Common with all tests on all systems.
4650source setup.vim
4751
@@ -99,6 +103,9 @@ endfunc
99103
100104func RunTheTest (test)
101105 echo ' Executing ' . a: test
106+ if has (' reltime' )
107+ let func_start = reltime ()
108+ endif
102109
103110 " Avoid stopping at the "hit enter" prompt
104111 set nomore
@@ -126,7 +133,11 @@ func RunTheTest(test)
126133 endtry
127134 endif
128135
129- call add (s: messages , ' Executing ' . a: test )
136+ let message = ' Executed ' . a: test
137+ if has (' reltime' )
138+ let message ..= ' in ' .. reltimestr (reltime (func_start)) .. ' seconds'
139+ endif
140+ call add (s: messages , message)
130141 let s: done += 1
131142
132143 if a: test = ~ ' Test_nocatch_'
@@ -232,6 +243,9 @@ func FinishTesting()
232243 else
233244 let message = ' Executed ' . s: done . (s: done > 1 ? ' tests' : ' test' )
234245 endif
246+ if has (' reltime' )
247+ let message ..= ' in ' .. reltimestr (reltime (s: start_time )) .. ' seconds'
248+ endif
235249 echo message
236250 call add (s: messages , message)
237251 if s: fail > 0
Original file line number Diff line number Diff line change @@ -767,6 +767,8 @@ static char *(features[]) =
767767
768768static int included_patches [] =
769769{ /* Add new patch number below this line */
770+ /**/
771+ 1484 ,
770772/**/
771773 1483 ,
772774/**/
You can’t perform that action at this time.
0 commit comments