From 535e423a6ae31b7b49e52768d95d6ada5b854cbb Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 15 Aug 2022 20:51:18 +0800 Subject: vim-patch:8.2.1803: a few failures are not tested MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: A few failures are not tested. Solution: Test a few failures. (Dominique Pellé, closes vim/vim#7075) https://github.com/vim/vim/commit/afe8cf617013fd8c3f0189f1e1fa7a2a6a8f7511 Cherry-pick a line in Test_argdelete() from patch 8.2.1736. --- src/nvim/testdir/test_cmdline.vim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nvim/testdir/test_cmdline.vim') diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 7aac731709..f95970223f 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -912,6 +912,10 @@ func Test_cmdline_complete_various() call feedkeys(":doautocmd User MyCmd a.c\\\"\", 'xt') call assert_equal("\"doautocmd User MyCmd a.c\", @:) + " completion of autocmd group after comma + call feedkeys(":doautocmd BufNew,BufEn\\\"\", 'xt') + call assert_equal("\"doautocmd BufNew,BufEnter", @:) + " completion for the :augroup command augroup XTest augroup END -- cgit From e73517e34e0c0aab3d078e39251b03ab5b418d0f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 15 Aug 2022 21:03:24 +0800 Subject: vim-patch:8.2.3345: some code not covered by tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Some code not covered by tests. Solution: Add a few more tests. (Dominique Pellé, closes vim/vim#8757) https://github.com/vim/vim/commit/bfb2bb16bc69441fa3ec13caacb2c94637a8a0ec --- src/nvim/testdir/test_cmdline.vim | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'src/nvim/testdir/test_cmdline.vim') diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index f95970223f..f1ca6dadfe 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -916,6 +916,14 @@ func Test_cmdline_complete_various() call feedkeys(":doautocmd BufNew,BufEn\\\"\", 'xt') call assert_equal("\"doautocmd BufNew,BufEnter", @:) + " completion of file name in :doautocmd + call writefile([], 'Xfile1') + call writefile([], 'Xfile2') + call feedkeys(":doautocmd BufEnter Xfi\\\"\", 'xt') + call assert_equal("\"doautocmd BufEnter Xfile1 Xfile2", @:) + call delete('Xfile1') + call delete('Xfile2') + " completion for the :augroup command augroup XTest augroup END @@ -1396,14 +1404,6 @@ func Test_cmdwin_jump_to_win() call assert_equal(1, winnr('$')) endfunc -" Test for backtick expression in the command line -func Test_cmd_backtick() - %argd - argadd `=['a', 'b', 'c']` - call assert_equal(['a', 'b', 'c'], argv()) - %argd -endfunc - func Test_cmdwin_tabpage() tabedit " v8.2.1919 isn't ported yet, so E492 is thrown after E11 here. @@ -1416,11 +1416,22 @@ func Test_cmdwin_tabpage() tabclose! endfunc +" Test for backtick expression in the command line +func Test_cmd_backtick() + CheckNotMSWindows " FIXME: see #19297 + %argd + argadd `=['a', 'b', 'c']` + call assert_equal(['a', 'b', 'c'], argv()) + %argd + + argadd `echo abc def` + call assert_equal(['abc def'], argv()) + %argd +endfunc + " Test for the :! command func Test_cmd_bang() - if !has('unix') - return - endif + CheckUnix let lines =<< trim [SCRIPT] " Test for no previous command -- cgit From 747dec7925e130e754cf5ef1db87dd8747923514 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 15 Aug 2022 21:12:42 +0800 Subject: vim-patch:8.2.3392: augroup completion escapes regexp pattern characters Problem: augroup completion escapes regexp pattern characters. Solution: Do not escape the augroup name. (closes vim/vim#8826) https://github.com/vim/vim/commit/b4d82e2a8d610c00139a74970df772eece2daf1c --- src/nvim/testdir/test_cmdline.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/nvim/testdir/test_cmdline.vim') diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index f1ca6dadfe..b9eefa937a 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -925,11 +925,13 @@ func Test_cmdline_complete_various() call delete('Xfile2') " completion for the :augroup command - augroup XTest + augroup XTest.test augroup END call feedkeys(":augroup X\\\"\", 'xt') - call assert_equal("\"augroup XTest", @:) - augroup! XTest + call assert_equal("\"augroup XTest.test", @:) + call feedkeys(":au X\\\"\", 'xt') + call assert_equal("\"au XTest.test", @:) + augroup! XTest.test " completion for the :unlet command call feedkeys(":unlet one two\\\"\", 'xt') -- cgit