To: vim_dev@googlegroups.com Subject: Patch 9.0.1315 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1315 Problem: Escaping for completion of map command not properly tested. Solution: Add a few test cases. (closes #12009) Files: src/testdir/test_cmdline.vim, src/testdir/test_cpoptions.vim *** ../vim-9.0.1314/src/testdir/test_cmdline.vim 2023-02-05 18:00:38.353400148 +0000 --- src/testdir/test_cmdline.vim 2023-02-17 16:35:45.855474196 +0000 *************** *** 327,343 **** call assert_equal('"map ', getreg(':')) call feedkeys(":map \\\"\", 'xt') call assert_equal("\"map \", getreg(':')) unmap ,f unmap ,g unmap unmap x ! set cpo-=< cpo-=B cpo-=k map left call feedkeys(":map \\"\", 'xt') call assert_equal('"map ', getreg(':')) call feedkeys(":map \\"\", 'xt') call assert_equal("\"map ", getreg(':')) unmap set cpo+=< --- 327,347 ---- call assert_equal('"map ', getreg(':')) call feedkeys(":map \\\"\", 'xt') call assert_equal("\"map \", getreg(':')) + call feedkeys(":map \\\"\", 'xt') + call assert_equal("\"map x", getreg(':')) unmap ,f unmap ,g unmap unmap x ! set cpo-=< cpo-=k map left call feedkeys(":map \\"\", 'xt') call assert_equal('"map ', getreg(':')) call feedkeys(":map \\"\", 'xt') call assert_equal("\"map ", getreg(':')) + call feedkeys(":map \\\\"\", 'xt') + call assert_equal("\"map \x", getreg(':')) unmap set cpo+=< *** ../vim-9.0.1314/src/testdir/test_cpoptions.vim 2022-10-13 12:29:34.233533860 +0100 --- src/testdir/test_cpoptions.vim 2023-02-17 16:38:35.155643494 +0000 *************** *** 67,81 **** --- 67,86 ---- func Test_cpo_B() let save_cpo = &cpo new + imap xk Test set cpo-=B iabbr abc ab\d exe "normal iabc " call assert_equal('abd ', getline(1)) + call feedkeys(":imap x\\\"\", 'tx') + call assert_equal('"imap x\\k', @:) %d set cpo+=B iabbr abc ab\d exe "normal iabc " call assert_equal('abd ', getline(1)) + call feedkeys(":imap x\\\"\", 'tx') + call assert_equal('"imap x\k', @:) close! let &cpo = save_cpo endfunc *************** *** 192,198 **** set cpo+=f read test_cpoptions.vim call assert_equal('test_cpoptions.vim', @%) ! close! let &cpo = save_cpo endfunc --- 197,204 ---- set cpo+=f read test_cpoptions.vim call assert_equal('test_cpoptions.vim', @%) ! ! bwipe! let &cpo = save_cpo endfunc *************** *** 438,444 **** set cpo+=P write >> XfileCpoP call assert_equal('XfileCpoP', @%) ! close! let &cpo = save_cpo endfunc --- 444,451 ---- set cpo+=P write >> XfileCpoP call assert_equal('XfileCpoP', @%) ! ! bwipe! let &cpo = save_cpo endfunc *** ../vim-9.0.1314/src/version.c 2023-02-16 15:03:08.505667449 +0000 --- src/version.c 2023-02-17 16:39:08.279676304 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1315, /**/ -- In a world without fences, who needs Gates and Windows? /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///