To: vim_dev@googlegroups.com Subject: Patch 8.2.0409 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0409 Problem: Search test leaves file behind. Solution: Delete the file. Also use Check commands. Files: src/testdir/test_search.vim *** ../vim-8.2.0408/src/testdir/test_search.vim 2020-02-21 21:30:33.871979710 +0100 --- src/testdir/test_search.vim 2020-03-19 15:03:04.419038123 +0100 *************** *** 5,13 **** source check.vim func Test_search_cmdline() ! if !exists('+incsearch') ! return ! endif " need to disable char_avail, " so that expansion of commandline works call test_override("char_avail", 1) --- 5,12 ---- source check.vim func Test_search_cmdline() ! CheckOption incsearch ! " need to disable char_avail, " so that expansion of commandline works call test_override("char_avail", 1) *************** *** 202,210 **** endfunc func Test_search_cmdline2() ! if !exists('+incsearch') ! return ! endif " need to disable char_avail, " so that expansion of commandline works call test_override("char_avail", 1) --- 201,208 ---- endfunc func Test_search_cmdline2() ! CheckOption incsearch ! " need to disable char_avail, " so that expansion of commandline works call test_override("char_avail", 1) *************** *** 446,454 **** endfunc func Test_search_cmdline3() ! if !exists('+incsearch') ! return ! endif call Cmdline3_prep() 1 " first match --- 444,451 ---- endfunc func Test_search_cmdline3() ! CheckOption incsearch ! call Cmdline3_prep() 1 " first match *************** *** 459,467 **** endfunc func Test_search_cmdline3s() ! if !exists('+incsearch') ! return ! endif call Cmdline3_prep() 1 call feedkeys(":%s/the\/xxx\", 'tx') --- 456,463 ---- endfunc func Test_search_cmdline3s() ! CheckOption incsearch ! call Cmdline3_prep() 1 call feedkeys(":%s/the\/xxx\", 'tx') *************** *** 485,493 **** endfunc func Test_search_cmdline3g() ! if !exists('+incsearch') ! return ! endif call Cmdline3_prep() 1 call feedkeys(":g/the\/d\", 'tx') --- 481,488 ---- endfunc func Test_search_cmdline3g() ! CheckOption incsearch ! call Cmdline3_prep() 1 call feedkeys(":g/the\/d\", 'tx') *************** *** 508,516 **** endfunc func Test_search_cmdline3v() ! if !exists('+incsearch') ! return ! endif call Cmdline3_prep() 1 call feedkeys(":v/the\/d\", 'tx') --- 503,510 ---- endfunc func Test_search_cmdline3v() ! CheckOption incsearch ! call Cmdline3_prep() 1 call feedkeys(":v/the\/d\", 'tx') *************** *** 525,533 **** endfunc func Test_search_cmdline4() ! if !exists('+incsearch') ! return ! endif " need to disable char_avail, " so that expansion of commandline works call test_override("char_avail", 1) --- 519,526 ---- endfunc func Test_search_cmdline4() ! CheckOption incsearch ! " need to disable char_avail, " so that expansion of commandline works call test_override("char_avail", 1) *************** *** 559,567 **** endfunc func Test_search_cmdline5() ! if !exists('+incsearch') ! return ! endif " Do not call test_override("char_avail", 1) so that and work " regardless char_avail. new --- 552,559 ---- endfunc func Test_search_cmdline5() ! CheckOption incsearch ! " Do not call test_override("char_avail", 1) so that and work " regardless char_avail. new *************** *** 581,589 **** func Test_search_cmdline6() " Test that consecutive matches " are caught by / ! if !exists('+incsearch') ! return ! endif " need to disable char_avail, " so that expansion of commandline works call test_override("char_avail", 1) --- 573,580 ---- func Test_search_cmdline6() " Test that consecutive matches " are caught by / ! CheckOption incsearch ! " need to disable char_avail, " so that expansion of commandline works call test_override("char_avail", 1) *************** *** 621,629 **** func Test_search_cmdline7() " Test that an pressing in an empty command line " does not move the cursor ! if !exists('+incsearch') ! return ! endif " need to disable char_avail, " so that expansion of commandline works call test_override("char_avail", 1) --- 612,619 ---- func Test_search_cmdline7() " Test that an pressing in an empty command line " does not move the cursor ! CheckOption incsearch ! " need to disable char_avail, " so that expansion of commandline works call test_override("char_avail", 1) *************** *** 754,762 **** endfunc func Test_search_cmdline_incsearch_highlight() ! if !exists('+incsearch') ! return ! endif set incsearch hlsearch " need to disable char_avail, " so that expansion of commandline works --- 744,751 ---- endfunc func Test_search_cmdline_incsearch_highlight() ! CheckOption incsearch ! set incsearch hlsearch " need to disable char_avail, " so that expansion of commandline works *************** *** 874,882 **** endfunc func Test_incsearch_cmdline_modifier() ! if !exists('+incsearch') ! return ! endif call test_override("char_avail", 1) new call setline(1, ['foo']) --- 863,870 ---- endfunc func Test_incsearch_cmdline_modifier() ! CheckOption incsearch ! call test_override("char_avail", 1) new call setline(1, ['foo']) *************** *** 918,929 **** endfunc func Test_incsearch_search_dump() ! if !exists('+incsearch') ! return ! endif ! if !CanRunVimInTerminal() ! throw 'Skipped: cannot make screendumps' ! endif call writefile([ \ 'set incsearch hlsearch scrolloff=0', \ 'for n in range(1, 8)', --- 906,914 ---- endfunc func Test_incsearch_search_dump() ! CheckOption incsearch ! CheckScreendump ! call writefile([ \ 'set incsearch hlsearch scrolloff=0', \ 'for n in range(1, 8)', *************** *** 951,959 **** endfunc func Test_incsearch_substitute() ! if !exists('+incsearch') ! return ! endif call test_override("char_avail", 1) new set incsearch --- 936,943 ---- endfunc func Test_incsearch_substitute() ! CheckOption incsearch ! call test_override("char_avail", 1) new set incsearch *************** *** 973,984 **** " Similar to Test_incsearch_substitute() but with a screendump halfway. func Test_incsearch_substitute_dump() ! if !exists('+incsearch') ! return ! endif ! if !CanRunVimInTerminal() ! throw 'Skipped: cannot make screendumps' ! endif call writefile([ \ 'set incsearch hlsearch scrolloff=0', \ 'for n in range(1, 10)', --- 957,965 ---- " Similar to Test_incsearch_substitute() but with a screendump halfway. func Test_incsearch_substitute_dump() ! CheckOption incsearch ! CheckScreendump ! call writefile([ \ 'set incsearch hlsearch scrolloff=0', \ 'for n in range(1, 10)', *************** *** 1085,1096 **** endfunc func Test_incsearch_highlighting() ! if !exists('+incsearch') ! return ! endif ! if !CanRunVimInTerminal() ! throw 'Skipped: cannot make screendumps' ! endif call writefile([ \ 'set incsearch hlsearch', --- 1066,1073 ---- endfunc func Test_incsearch_highlighting() ! CheckOption incsearch ! CheckScreendump call writefile([ \ 'set incsearch hlsearch', *************** *** 1106,1117 **** call term_sendkeys(buf, ":%s;ello/the") call VerifyScreenDump(buf, 'Test_incsearch_substitute_15', {}) call term_sendkeys(buf, "") endfunc func Test_incsearch_with_change() ! if !has('timers') || !exists('+incsearch') || !CanRunVimInTerminal() ! throw 'Skipped: cannot make screendumps and/or timers feature and/or incsearch option missing' ! endif call writefile([ \ 'set incsearch hlsearch scrolloff=0', --- 1083,1097 ---- call term_sendkeys(buf, ":%s;ello/the") call VerifyScreenDump(buf, 'Test_incsearch_substitute_15', {}) call term_sendkeys(buf, "") + + call StopVimInTerminal(buf) + call delete('Xis_subst_hl_script') endfunc func Test_incsearch_with_change() ! CheckFeature timers ! CheckOption incsearch ! CheckScreendump call writefile([ \ 'set incsearch hlsearch scrolloff=0', *************** *** 1134,1145 **** " Similar to Test_incsearch_substitute_dump() for :sort func Test_incsearch_sort_dump() ! if !exists('+incsearch') ! return ! endif ! if !CanRunVimInTerminal() ! throw 'Skipped: cannot make screendumps' ! endif call writefile([ \ 'set incsearch hlsearch scrolloff=0', \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])', --- 1114,1122 ---- " Similar to Test_incsearch_substitute_dump() for :sort func Test_incsearch_sort_dump() ! CheckOption incsearch ! CheckScreendump ! call writefile([ \ 'set incsearch hlsearch scrolloff=0', \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])', *************** *** 1160,1171 **** " Similar to Test_incsearch_substitute_dump() for :vimgrep famiry func Test_incsearch_vimgrep_dump() ! if !exists('+incsearch') ! return ! endif ! if !CanRunVimInTerminal() ! throw 'Skipped: cannot make screendumps' ! endif call writefile([ \ 'set incsearch hlsearch scrolloff=0', \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])', --- 1137,1145 ---- " Similar to Test_incsearch_substitute_dump() for :vimgrep famiry func Test_incsearch_vimgrep_dump() ! CheckOption incsearch ! CheckScreendump ! call writefile([ \ 'set incsearch hlsearch scrolloff=0', \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])', *************** *** 1201,1209 **** endfunc func Test_keep_last_search_pattern() ! if !exists('+incsearch') ! return ! endif new call setline(1, ['foo', 'foo', 'foo']) set incsearch --- 1175,1182 ---- endfunc func Test_keep_last_search_pattern() ! CheckOption incsearch ! new call setline(1, ['foo', 'foo', 'foo']) set incsearch *************** *** 1222,1230 **** endfunc func Test_word_under_cursor_after_match() ! if !exists('+incsearch') ! return ! endif new call setline(1, 'foo bar') set incsearch --- 1195,1202 ---- endfunc func Test_word_under_cursor_after_match() ! CheckOption incsearch ! new call setline(1, 'foo bar') set incsearch *************** *** 1241,1249 **** endfunc func Test_subst_word_under_cursor() ! if !exists('+incsearch') ! return ! endif new call setline(1, ['int SomeLongName;', 'for (xxx = 1; xxx < len; ++xxx)']) set incsearch --- 1213,1220 ---- endfunc func Test_subst_word_under_cursor() ! CheckOption incsearch ! new call setline(1, ['int SomeLongName;', 'for (xxx = 1; xxx < len; ++xxx)']) set incsearch *************** *** 1258,1266 **** endfunc func Test_search_undefined_behaviour() ! if !has("terminal") ! return ! endif let h = winheight(0) if h < 3 return --- 1229,1236 ---- endfunc func Test_search_undefined_behaviour() ! CheckFeature terminal ! let h = winheight(0) if h < 3 return *************** *** 1326,1334 **** " ' ̇' U+0307 Dec:775 COMBINING DOT ABOVE ̇ /\%u307\Z "\u0307" " ' ̣' U+0323 Dec:803 COMBINING DOT BELOW ̣ /\%u323 "\u0323" " Those should also appear on the commandline ! if !exists('+incsearch') ! return ! endif call Cmdline3_prep() 1 let bufcontent = ['', 'Miạ̀́̇m'] --- 1296,1303 ---- " ' ̇' U+0307 Dec:775 COMBINING DOT ABOVE ̇ /\%u307\Z "\u0307" " ' ̣' U+0323 Dec:803 COMBINING DOT BELOW ̣ /\%u323 "\u0323" " Those should also appear on the commandline ! CheckOption incsearch ! call Cmdline3_prep() 1 let bufcontent = ['', 'Miạ̀́̇m'] *************** *** 1377,1385 **** endfunc func Test_incsearch_add_char_under_cursor() ! if !exists('+incsearch') ! return ! endif set incsearch new call setline(1, ['find match', 'anything']) --- 1346,1353 ---- endfunc func Test_incsearch_add_char_under_cursor() ! CheckOption incsearch ! set incsearch new call setline(1, ['find match', 'anything']) *** ../vim-8.2.0408/src/version.c 2020-03-19 14:52:16.973228215 +0100 --- src/version.c 2020-03-19 15:04:02.850835883 +0100 *************** *** 740,741 **** --- 740,743 ---- { /* Add new patch number below this line */ + /**/ + 409, /**/ -- "Intelligence has much less practical application than you'd think." -- Scott Adams, Dilbert. /// 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 ///