File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,14 +48,16 @@ let s:srcdir = expand('%:p:h:h')
4848" Support function: get the alloc ID by name.
4949function GetAllocId (name)
5050 exe ' split ' . s: srcdir . ' /alloc.h'
51- /typedef enum/
52- let top = getline (' .' )
51+ let top = search (' typedef enum' )
52+ if top == 0
53+ call add (v: errors , ' typedef not found in alloc.h' )
54+ endif
5355 let lnum = search (' aid_' . a: name . ' ,' )
5456 if lnum == 0
5557 call add (v: errors , ' Alloc ID ' . a: name . ' not defined' )
5658 endif
5759 close
58- return lnum - top
60+ return lnum - top - 1
5961endfunc
6062
6163
Original file line number Diff line number Diff line change 11" Tests for :unlet
22
33func Test_read_only ()
4- try
5- " this caused a crash
6- unlet count
7- catch
8- call assert_true (v: exception = ~ ' :E795:' )
9- endtry
10- try
11- " this caused a crash
12- unlet errmsg
13- catch
14- call assert_true (v: exception = ~ ' :E795:' )
15- endtry
4+ " these caused a crash
5+ call assert_fails (' unlet count' , ' E795:' )
6+ call assert_fails (' unlet errmsg' , ' E795:' )
167endfunc
178
189func Test_existing ()
@@ -24,9 +15,5 @@ endfunc
2415
2516func Test_not_existing ()
2617 unlet ! does_not_exist
27- try
28- unlet does_not_exist
29- catch
30- call assert_true (v: exception = ~ ' :E108:' )
31- endtry
18+ call assert_fails (' unlet does_not_exist' , ' E108:' )
3219endfunc
Original file line number Diff line number Diff line change @@ -741,6 +741,8 @@ static char *(features[]) =
741741
742742static int included_patches [] =
743743{ /* Add new patch number below this line */
744+ /**/
745+ 1097 ,
744746/**/
745747 1096 ,
746748/**/
You can’t perform that action at this time.
0 commit comments