To: vim_dev@googlegroups.com Subject: Patch 7.4.2190 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2190 Problem: When startup test fails it's not easy to find out why. GUI test fails with Gnome. Solution: Add the help entry matches to a list an assert that. Set $HOME for Gnome to create .gnome2 directory. Files: src/testdir/test_startup.vim, src/testdir/test_gui.vim *** ../vim-7.4.2189/src/testdir/test_startup.vim 2016-08-07 16:50:07.751926334 +0200 --- src/testdir/test_startup.vim 2016-08-09 22:44:21.557346091 +0200 *************** *** 72,87 **** call assert_match('Vi IMproved', lines[0]) " check if couple of lines are there ! let found = 0 for line in lines if line =~ '-R.*Readonly mode' ! let found += 1 endif ! if line =~ '--version' ! let found += 1 endif endfor ! call assert_equal(2, found) endif call delete('Xtestout') endfunc --- 72,88 ---- call assert_match('Vi IMproved', lines[0]) " check if couple of lines are there ! let found = [] for line in lines if line =~ '-R.*Readonly mode' ! call add(found, 'Readonly mode') endif ! " Watch out for a second --version line in the Gnome version. ! if line =~ '--version.*Print version information and exit' ! call add(found, "--version") endif endfor ! call assert_equal(['Readonly mode', '--version'], found) endif call delete('Xtestout') endfunc *** ../vim-7.4.2189/src/testdir/test_gui.vim 2016-08-04 21:21:09.401835126 +0200 --- src/testdir/test_gui.vim 2016-08-09 22:52:49.004750793 +0200 *************** *** 9,14 **** --- 9,22 ---- if has("gui_kde") set guifont=Courier\ 10\ Pitch/8/-1/5/50/0/0/0/0/0 endif + + " Gnome insists on creating $HOME/.gnome2/.. + call mkdir('Xhome') + let $HOME = fnamemodify('Xhome', ':p') + endfunc + + func TearDown() + call delete('Xhome', 'rf') endfunc " Test for resetting "secure" flag after GUI has started. *** ../vim-7.4.2189/src/version.c 2016-08-09 22:13:51.858043815 +0200 --- src/version.c 2016-08-09 22:56:53.214554186 +0200 *************** *** 765,766 **** --- 765,768 ---- { /* Add new patch number below this line */ + /**/ + 2190, /**/ -- It's totally unfair to suggest - as many have - that engineers are socially inept. Engineers simply have different objectives when it comes to social interaction. (Scott Adams - The Dilbert principle) /// 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 ///