aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-03 21:17:03 +0800
committerGitHub <noreply@github.com>2022-07-03 21:17:03 +0800
commit0313aba77a447558c3b373370b60eb78067e1c4d (patch)
treeeeecce077c2d1e1e38e6a8d9e262c013e421c514 /src/nvim/testdir
parente837f29ce6c7784340ae2cd866aa239462d3920c (diff)
downloadrneovim-0313aba77a447558c3b373370b60eb78067e1c4d.tar.gz
rneovim-0313aba77a447558c3b373370b60eb78067e1c4d.tar.bz2
rneovim-0313aba77a447558c3b373370b60eb78067e1c4d.zip
vim-patch:9.0.0031: <mods> of user command does not have correct verbose value (#19215)
vim-patch:9.0.0031: <mods> of user command does not have correct verbose value Problem: <mods> of user command does not have correct verbose value. Solution: Use the value from the command modifier. (closes vim/vim#10651) https://github.com/vim/vim/commit/9359e8a6d99fe2abfcbb9603339f1740d8870cc6
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_usercommands.vim29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/nvim/testdir/test_usercommands.vim b/src/nvim/testdir/test_usercommands.vim
index 596b8b53aa..015a16705e 100644
--- a/src/nvim/testdir/test_usercommands.vim
+++ b/src/nvim/testdir/test_usercommands.vim
@@ -56,7 +56,10 @@ function Test_cmdmods()
call assert_equal('lockmarks', g:mods)
loc MyCmd
call assert_equal('lockmarks', g:mods)
- " noautocmd MyCmd
+ noautocmd MyCmd
+ call assert_equal('noautocmd', g:mods)
+ noa MyCmd
+ call assert_equal('noautocmd', g:mods)
noswapfile MyCmd
call assert_equal('noswapfile', g:mods)
nos MyCmd
@@ -70,29 +73,43 @@ function Test_cmdmods()
call assert_equal('silent', g:mods)
sil MyCmd
call assert_equal('silent', g:mods)
+ silent! MyCmd
+ call assert_equal('silent!', g:mods)
+ sil! MyCmd
+ call assert_equal('silent!', g:mods)
tab MyCmd
call assert_equal('tab', g:mods)
topleft MyCmd
call assert_equal('topleft', g:mods)
to MyCmd
call assert_equal('topleft', g:mods)
- " unsilent MyCmd
+ unsilent MyCmd
+ call assert_equal('unsilent', g:mods)
+ uns MyCmd
+ call assert_equal('unsilent', g:mods)
verbose MyCmd
call assert_equal('verbose', g:mods)
verb MyCmd
call assert_equal('verbose', g:mods)
+ 0verbose MyCmd
+ call assert_equal('0verbose', g:mods)
+ 3verbose MyCmd
+ call assert_equal('3verbose', g:mods)
+ 999verbose MyCmd
+ call assert_equal('999verbose', g:mods)
vertical MyCmd
call assert_equal('vertical', g:mods)
vert MyCmd
call assert_equal('vertical', g:mods)
aboveleft belowright botright browse confirm hide keepalt keepjumps
- \ keepmarks keeppatterns lockmarks noswapfile silent tab
- \ topleft verbose vertical MyCmd
+ \ keepmarks keeppatterns lockmarks noautocmd noswapfile silent
+ \ tab topleft unsilent verbose vertical MyCmd
call assert_equal('browse confirm hide keepalt keepjumps ' .
- \ 'keepmarks keeppatterns lockmarks noswapfile silent ' .
- \ 'verbose aboveleft belowright botright tab topleft vertical', g:mods)
+ \ 'keepmarks keeppatterns lockmarks noswapfile unsilent noautocmd ' .
+ \ 'silent verbose aboveleft belowright botright tab topleft vertical',
+ \ g:mods)
let g:mods = ''
command! -nargs=* MyQCmd let g:mods .= '<q-mods> '