diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-10-26 13:41:43 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-10-26 13:52:42 +0800 |
| commit | 7b39ce36a4599539cd5cb07dad6bd980d30a3180 (patch) | |
| tree | 837c0973319b8d168db9ccd96d6ae113d29287e7 /src/nvim/testdir/test_cmdline.vim | |
| parent | d40739843cf9a160587032bf381c440079e5a8ce (diff) | |
| download | rneovim-7b39ce36a4599539cd5cb07dad6bd980d30a3180.tar.gz rneovim-7b39ce36a4599539cd5cb07dad6bd980d30a3180.tar.bz2 rneovim-7b39ce36a4599539cd5cb07dad6bd980d30a3180.zip | |
vim-patch:8.2.0418: code in eval.c not sufficiently covered by tests
Problem: Code in eval.c not sufficiently covered by tests.
Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5815)
https://github.com/vim/vim/commit/8b633135106dda8605463b780573c45b00c22afe
Nvim does not have v:none, so comment out test for it.
Diffstat (limited to 'src/nvim/testdir/test_cmdline.vim')
| -rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index c8b8c88d75..00bfadec93 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -854,7 +854,7 @@ func Test_cmdline_complete_bang() endif endfunc -funct Test_cmdline_complete_languages() +func Test_cmdline_complete_languages() let lang = substitute(execute('language time'), '.*"\(.*\)"$', '\1', '') call assert_equal(lang, v:lc_time) @@ -891,10 +891,8 @@ endfunc func Test_cmdline_complete_env_variable() let $X_VIM_TEST_COMPLETE_ENV = 'foo' - call feedkeys(":edit $X_VIM_TEST_COMPLETE_E\<C-A>\<C-B>\"\<CR>", 'tx') call assert_match('"edit $X_VIM_TEST_COMPLETE_ENV', @:) - unlet $X_VIM_TEST_COMPLETE_ENV endfunc @@ -1074,17 +1072,13 @@ func Test_cmdline_complete_various() call feedkeys(":e `a1b2c\t\<C-B>\"\<CR>", 'xt') call assert_equal('"e `a1b2c', @:) - " completion for the expression register - call feedkeys(":\"\<C-R>=float2\t\"\<C-B>\"\<CR>", 'xt') - call assert_equal('"float2nr("', @=) - " completion for :language command with an invalid argument call feedkeys(":language dummy \t\<C-B>\"\<CR>", 'xt') call assert_equal("\"language dummy \t", @:) " completion for commands after a :global command - call feedkeys(":g/a\\xb/call float2\t\<C-B>\"\<CR>", 'xt') - call assert_equal('"g/a\xb/call float2nr(', @:) + call feedkeys(":g/a\\xb/clearj\t\<C-B>\"\<CR>", 'xt') + call assert_equal('"g/a\xb/clearjumps', @:) " completion with ambiguous user defined commands com TCmd1 echo 'TCmd1' @@ -1097,20 +1091,6 @@ func Test_cmdline_complete_various() " completion after a range followed by a pipe (|) character call feedkeys(":1,10 | chist\t\<C-B>\"\<CR>", 'xt') call assert_equal('"1,10 | chistory', @:) - - " completion for window local variables - let w:wvar1 = 10 - let w:wvar2 = 10 - call feedkeys(":echo w:wvar\<C-A>\<C-B>\"\<CR>", 'xt') - call assert_equal('"echo w:wvar1 w:wvar2', @:) - unlet w:wvar1 w:wvar2 - - " completion for tab local variables - let t:tvar1 = 10 - let t:tvar2 = 10 - call feedkeys(":echo t:tvar\<C-A>\<C-B>\"\<CR>", 'xt') - call assert_equal('"echo t:tvar1 t:tvar2', @:) - unlet t:tvar1 t:tvar2 endfunc func Test_cmdline_write_alternatefile() |