patch 9.1.0760: tests: no error reported, if gen_opt_test.vim fails

Commit: 
https://github.com/vim/vim/commit/d4ad4c9b3e9f9fd8ba1a7d0d61ec5839df645635
Author: Milly <milly...@gmail.com>
Date:   Sun Oct 6 16:27:28 2024 +0200

    patch 9.1.0760: tests: no error reported, if gen_opt_test.vim fails
    
    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...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak
index 2676111c9..f26950e2e 100644
--- a/src/testdir/Make_ming.mak
+++ b/src/testdir/Make_ming.mak
@@ -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
diff --git a/src/testdir/Make_mvc.mak b/src/testdir/Make_mvc.mak
index 1bf9eae25..bb38e25c5 100644
--- a/src/testdir/Make_mvc.mak
+++ b/src/testdir/Make_mvc.mak
@@ -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
diff --git a/src/testdir/Makefile b/src/testdir/Makefile
index b6e8c8024..2827f994a 100644
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -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
diff --git a/src/testdir/gen_opt_test.vim b/src/testdir/gen_opt_test.vim
index 5be06cea1..09db320ee 100644
--- a/src/testdir/gen_opt_test.vim
+++ b/src/testdir/gen_opt_test.vim
@@ -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!
diff --git a/src/version.c b/src/version.c
index 63a6bc087..eff0cf824 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    760,
 /**/
     759,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1sxSGz-00G5TS-VK%40256bit.org.

Raspunde prin e-mail lui