diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-15 20:51:18 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-08-15 21:19:35 +0800 |
commit | 535e423a6ae31b7b49e52768d95d6ada5b854cbb (patch) | |
tree | 8b9a1a5c51c21280f00dc3bd46004ecd58a1605d /src | |
parent | cbb2e634c9da7cc6e5fe6f18539ab7deb9d67915 (diff) | |
download | rneovim-535e423a6ae31b7b49e52768d95d6ada5b854cbb.tar.gz rneovim-535e423a6ae31b7b49e52768d95d6ada5b854cbb.tar.bz2 rneovim-535e423a6ae31b7b49e52768d95d6ada5b854cbb.zip |
vim-patch:8.2.1803: a few failures are not tested
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_arglist.vim | 9 | ||||
-rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 4 | ||||
-rw-r--r-- | src/nvim/testdir/test_listdict.vim | 2 |
3 files changed, 13 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_arglist.vim b/src/nvim/testdir/test_arglist.vim index ca7c8574cb..e2a859a5da 100644 --- a/src/nvim/testdir/test_arglist.vim +++ b/src/nvim/testdir/test_arglist.vim @@ -420,6 +420,8 @@ func Test_argdelete() call assert_equal(['b'], argv()) call assert_fails('argdelete', 'E610:') call assert_fails('1,100argdelete', 'E16:') + call assert_fails('argdel /\)/', 'E55:') + call assert_fails('1argdel 1', 'E474:') call Reset_arglist() args a b c d @@ -472,13 +474,16 @@ func Test_arglist_autocmd() new " redefine arglist; go to Xxx1 next! Xxx1 Xxx2 Xxx3 - " open window for all args + " open window for all args; Reading Xxx2 will change the arglist and the + " third window will get Xxx1: + " win 1: Xxx1 + " win 2: Xxx2 + " win 3: Xxx1 all call assert_equal('test file Xxx1', getline(1)) wincmd w wincmd w call assert_equal('test file Xxx1', getline(1)) - " should now be in Xxx2 rewind call assert_equal('test file Xxx2', getline(1)) 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\<C-A>\<C-B>\"\<CR>", 'xt') call assert_equal("\"doautocmd User MyCmd a.c\<C-A>", @:) + " completion of autocmd group after comma + call feedkeys(":doautocmd BufNew,BufEn\<C-A>\<C-B>\"\<CR>", 'xt') + call assert_equal("\"doautocmd BufNew,BufEnter", @:) + " completion for the :augroup command augroup XTest augroup END diff --git a/src/nvim/testdir/test_listdict.vim b/src/nvim/testdir/test_listdict.vim index aa66d86af1..2f4e1db4a1 100644 --- a/src/nvim/testdir/test_listdict.vim +++ b/src/nvim/testdir/test_listdict.vim @@ -649,6 +649,8 @@ func Test_reduce() call assert_fails("call reduce({}, { acc, val -> acc + val }, 1)", 'E897:') call assert_fails("call reduce(0, { acc, val -> acc + val }, 1)", 'E897:') call assert_fails("call reduce('', { acc, val -> acc + val }, 1)", 'E897:') + call assert_fails("call reduce([1, 2], 'Xdoes_not_exist')", 'E117:') + call assert_fails("echo reduce(0z01, { acc, val -> 2 * acc + val }, '')", 'E39:') let g:lut = [1, 2, 3, 4] func EvilRemove() |