To: vim_dev@googlegroups.com Subject: Patch 7.4.2153 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2153 Problem: GUI test isn't testing much. Solution: Turn into a new style test. Execute a shell command. Files: src/testdir/test_gui.vim, src/testdir/test16.in, src/testdir/test16.ok, src/testdir/Make_all.mak, src/Makefile, src/testdir/Make_vms.mms *** ../vim-7.4.2152/src/testdir/test_gui.vim 2016-08-04 20:04:49.027676505 +0200 --- src/testdir/test_gui.vim 2016-08-03 23:20:10.110982723 +0200 *************** *** 0 **** --- 1,28 ---- + " Tests specifically for the GUI + + if !has('gui') || ($DISPLAY == "" && !has('gui_running')) + finish + endif + + " For KDE set a font, empty 'guifont' may cause a hang. + func SetUp() + if has("gui_kde") + set guifont=Courier\ 10\ Pitch/8/-1/5/50/0/0/0/0/0 + endif + endfunc + + " Test for resetting "secure" flag after GUI has started. + " Must be run first. + func Test_1_set_secure() + set exrc secure + gui -f + call assert_equal(1, has('gui_running')) + endfunc + + func Test_shell_command() + new + r !echo 'hello' + call assert_equal('hello', getline(2)) + bwipe! + call assert_true(1, match(execute('winpos'), 'Window position: X \d\+, Y \d\+') >= 0) + endfunc *** ../vim-7.4.2152/src/testdir/test16.in 2015-01-20 12:13:56.971270425 +0100 --- src/testdir/test16.in 1970-01-01 01:00:00.000000000 +0100 *************** *** 1,16 **** - Tests for resetting "secure" flag after GUI has started. - For KDE set a font, empty 'guifont' may cause a hang. - - STARTTEST - :so small.vim - :if $DISPLAY == "" | e! test.ok | wq! test.out | endif - :set exrc secure - :if has("gui_kde") - : set guifont=Courier\ 10\ Pitch/8/-1/5/50/0/0/0/0/0 - :endif - :gui -f - :.,$w! test.out - :qa! - ENDTEST - - just some text --- 0 ---- *** ../vim-7.4.2152/src/testdir/test16.ok 2010-05-15 13:04:10.000000000 +0200 --- src/testdir/test16.ok 1970-01-01 01:00:00.000000000 +0100 *************** *** 1,2 **** - - just some text --- 0 ---- *** ../vim-7.4.2152/src/testdir/Make_all.mak 2016-07-30 16:16:08.446473145 +0200 --- src/testdir/Make_all.mak 2016-08-03 23:03:51.996325306 +0200 *************** *** 154,160 **** # Tests for the GUI. ! SCRIPTS_GUI = test16.out # Tests using runtest.vim.vim. --- 154,160 ---- # Tests for the GUI. ! SCRIPTS_GUI = # Tests using runtest.vim.vim. *************** *** 171,176 **** --- 171,177 ---- test_digraph.res \ test_farsi.res \ test_gn.res \ + test_gui.res \ test_hardcopy.res \ test_history.res \ test_increment.res \ *** ../vim-7.4.2152/src/Makefile 2016-07-30 16:16:08.446473145 +0200 --- src/Makefile 2016-08-03 23:03:21.236620130 +0200 *************** *** 2039,2045 **** test_wordcount \ test_writefile \ test2 test3 test4 test5 test6 test7 test8 test9 \ ! test11 test12 test13 test14 test15 test16 test17 test18 test19 \ test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \ test30 test31 test32 test33 test34 test36 test37 test38 test39 \ test40 test41 test42 test43 test44 test45 test46 test48 test49 \ --- 2039,2045 ---- test_wordcount \ test_writefile \ test2 test3 test4 test5 test6 test7 test8 test9 \ ! test11 test12 test13 test14 test15 test17 test18 test19 \ test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \ test30 test31 test32 test33 test34 test36 test37 test38 test39 \ test40 test41 test42 test43 test44 test45 test46 test48 test49 \ *************** *** 2080,2085 **** --- 2080,2086 ---- test_glob2regpat \ test_gn \ test_goto \ + test_gui \ test_hardcopy \ test_help_tagjump \ test_history \ *** ../vim-7.4.2152/src/testdir/Make_vms.mms 2016-03-19 22:53:54.229469402 +0100 --- src/testdir/Make_vms.mms 2016-08-04 20:03:47.604230615 +0200 *************** *** 4,10 **** # Authors: Zoltan Arpadffy, # Sandor Kopanyi, # ! # Last change: 2016 Feb 25 # # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. # Edit the lines in the Configuration section below to select. --- 4,10 ---- # Authors: Zoltan Arpadffy, # Sandor Kopanyi, # ! # Last change: 2016 Aug 04 # # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. # Edit the lines in the Configuration section below to select. *************** *** 104,110 **** # On ODS-2 tests fail. .IFDEF WANT_GUI ! SCRIPT_GUI = test16.out GUI_OPTION = -g .ENDIF --- 104,110 ---- # On ODS-2 tests fail. .IFDEF WANT_GUI ! SCRIPT_GUI = GUI_OPTION = -g .ENDIF *** ../vim-7.4.2152/src/version.c 2016-08-03 22:08:41.747652107 +0200 --- src/version.c 2016-08-03 23:16:30.109076437 +0200 *************** *** 765,766 **** --- 765,768 ---- { /* Add new patch number below this line */ + /**/ + 2153, /**/ -- CART DRIVER: Bring out your dead! There are legs stick out of windows and doors. Two MEN are fighting in the mud - covered from head to foot in it. Another MAN is on his hands in knees shovelling mud into his mouth. We just catch sight of a MAN falling into a well. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///