diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2016-08-25 21:54:00 -0400 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2016-08-25 21:54:00 -0400 |
| commit | 7bc627b3c8d53e0f45985b35835e0b339dd2c006 (patch) | |
| tree | f0be6606ebb224e542107c1cc8615324c9e74e08 /src/nvim/testdir | |
| parent | 4af6ec746c821078859469adc46cf7bef5c629fa (diff) | |
| parent | db2aa27df17742a46f2861a53f8b61826e0318ea (diff) | |
| download | rneovim-7bc627b3c8d53e0f45985b35835e0b339dd2c006.tar.gz rneovim-7bc627b3c8d53e0f45985b35835e0b339dd2c006.tar.bz2 rneovim-7bc627b3c8d53e0f45985b35835e0b339dd2c006.zip | |
Merge #5210 'vim-patch:7.4.1898 + :Man modifiers support'.
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/Makefile | 1 | ||||
| -rw-r--r-- | src/nvim/testdir/test_usercommands.vim | 48 |
2 files changed, 49 insertions, 0 deletions
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 4979aae57a..b7aacc7b3b 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -36,6 +36,7 @@ NEW_TESTS = \ test_help_tagjump.res \ test_langmap.res \ test_syntax.res \ + test_usercommands.res \ test_timers.res \ test_viml.res \ test_visual.res \ diff --git a/src/nvim/testdir/test_usercommands.vim b/src/nvim/testdir/test_usercommands.vim new file mode 100644 index 0000000000..f593d16dbf --- /dev/null +++ b/src/nvim/testdir/test_usercommands.vim @@ -0,0 +1,48 @@ +" Tests for user defined commands + +" Test for <mods> in user defined commands +function Test_cmdmods() + let g:mods = '' + + command! -nargs=* MyCmd let g:mods .= '<mods> ' + + MyCmd + aboveleft MyCmd + belowright MyCmd + botright MyCmd + browse MyCmd + confirm MyCmd + hide MyCmd + keepalt MyCmd + keepjumps MyCmd + keepmarks MyCmd + keeppatterns MyCmd + lockmarks MyCmd + noswapfile MyCmd + silent MyCmd + tab MyCmd + topleft MyCmd + verbose MyCmd + vertical MyCmd + + aboveleft belowright botright browse confirm hide keepalt keepjumps + \ keepmarks keeppatterns lockmarks noswapfile silent tab + \ topleft verbose vertical MyCmd + + call assert_equal(' aboveleft belowright botright browse confirm ' . + \ 'hide keepalt keepjumps keepmarks keeppatterns lockmarks ' . + \ 'noswapfile silent tab topleft verbose vertical aboveleft ' . + \ 'belowright botright browse confirm hide keepalt keepjumps ' . + \ 'keepmarks keeppatterns lockmarks noswapfile silent tab topleft ' . + \ 'verbose vertical ', g:mods) + + let g:mods = '' + command! -nargs=* MyQCmd let g:mods .= '<q-mods> ' + + vertical MyQCmd + call assert_equal('"vertical" ', g:mods) + + delcommand MyCmd + delcommand MyQCmd + unlet g:mods +endfunction |