]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0760: tests: no error reported, if gen_opt_test.vim fails v9.1.0760
authorMilly <milly.ca@gmail.com>
Sun, 6 Oct 2024 14:27:28 +0000 (16:27 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 6 Oct 2024 14:27:28 +0000 (16:27 +0200)
Problem:  tests: no error reported, if gen_opt_test.vim fails
Solution: Make Vim exit with return code 1 in case of any error
          (Milly)

closes: #15795

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/Make_ming.mak
src/testdir/Make_mvc.mak
src/testdir/Makefile
src/testdir/gen_opt_test.vim
src/version.c

index 2676111c9984e5dc81a64a338d1bd1f8af129646..f26950e2e30c9e4f4f795c10f945599ce90f94ba 100644 (file)
@@ -158,7 +158,7 @@ test_gui_init.res: test_gui_init.vim
        @$(DEL) vimcmd
 
 opt_test.vim: ../optiondefs.h gen_opt_test.vim
-       $(VIMPROG) -u NONE -S gen_opt_test.vim --noplugin --not-a-term ../optiondefs.h
+       $(VIMPROG) -e -s -u NONE $(COMMON_ARGS) --nofork -S gen_opt_test.vim ../optiondefs.h
 
 test_bench_regexp.res: test_bench_regexp.vim
        -$(DEL) benchmark.out
index 1bf9eae2546f42c597d554b8f9ca0bcf1385972c..bb38e25c5167de0bc31e8e3df8dc9972316d8be0 100644 (file)
@@ -152,7 +152,7 @@ test_gui_init.res: test_gui_init.vim
        @del vimcmd
 
 opt_test.vim: ../optiondefs.h gen_opt_test.vim
-       $(VIMPROG) -u NONE -S gen_opt_test.vim --noplugin --not-a-term ../optiondefs.h
+       $(VIMPROG) -e -s -u NONE $(COMMON_ARGS) --nofork -S gen_opt_test.vim ../optiondefs.h
 
 test_bench_regexp.res: test_bench_regexp.vim
        -if exist benchmark.out del benchmark.out
index b6e8c802482f8ce80c0a5051045f71ab0f958561..2827f994a56f4da0054e22444d572d1b12625d69 100644 (file)
@@ -161,7 +161,7 @@ test_gui_init.res: test_gui_init.vim
        @rm vimcmd
 
 opt_test.vim: ../optiondefs.h gen_opt_test.vim
-       $(VIMPROG) -u NONE -S gen_opt_test.vim --noplugin --not-a-term ../optiondefs.h
+       $(VIMPROG) -e -s -u NONE $(NO_INITS) --nofork --gui-dialog-file guidialog -S gen_opt_test.vim ../optiondefs.h
 
 test_xxd.res:
        XXD=$(XXDPROG); export XXD; $(RUN_VIMTEST) $(NO_INITS) -S runtest.vim test_xxd.vim
index 5be06cea12fd9bf9969c12e7d30f7701853184f0..09db320eeee4865c70db10212001c5c996a7f6a9 100644 (file)
@@ -1,10 +1,12 @@
-" Script to generate testdir/opt_test.vim from option.c
+" Script to generate testdir/opt_test.vim from optiondefs.h
 
 set cpo=&vim
 
 " Only do this when build with the +eval feature.
 if 1
 
+try
+
 set nomore
 
 const K_KENTER = -16715
@@ -244,6 +246,13 @@ call add(script, 'let &lines = save_lines')
 
 call writefile(script, 'opt_test.vim')
 
+" Exit with error-code if error occurs.
+catch
+  set verbose=1
+  echoc 'Error:' v:exception 'in' v:throwpoint
+  cq! 1
+endtry
+
 endif
 
 qa!
index 63a6bc08792d0c3f1db8fccc0295b3788cbb57bd..eff0cf824db7f15d1609826988646fe3428f4d59 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    760,
 /**/
     759,
 /**/