diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-12-03 22:46:11 -0500 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-12-03 22:48:27 -0500 |
commit | abd32c1bb8c01725291a8de2a691b89ee7050012 (patch) | |
tree | 273df4b7b8c293b3cdd5724fe6bb958d425889ec | |
parent | 7e97587daec2bc9e5989e4c2b15785d84314debc (diff) | |
download | rneovim-abd32c1bb8c01725291a8de2a691b89ee7050012.tar.gz rneovim-abd32c1bb8c01725291a8de2a691b89ee7050012.tar.bz2 rneovim-abd32c1bb8c01725291a8de2a691b89ee7050012.zip |
vim-patch:8.1.0559: command line completion not sufficiently tested
Problem: Command line completion not sufficiently tested.
Solution: Add more tests. (Dominique Pelle, closes vim/vim#3622)
https://github.com/vim/vim/commit/b513d3079bbe3f59a1f1a3d6931939a76cd7e54a
-rw-r--r-- | src/nvim/testdir/test_arglist.vim | 12 | ||||
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 4 | ||||
-rw-r--r-- | src/nvim/testdir/test_history.vim | 5 | ||||
-rw-r--r-- | src/nvim/testdir/test_messages.vim | 5 | ||||
-rw-r--r-- | src/nvim/testdir/test_syntax.vim | 9 |
5 files changed, 35 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_arglist.vim b/src/nvim/testdir/test_arglist.vim index 19d0cee47a..20171bb599 100644 --- a/src/nvim/testdir/test_arglist.vim +++ b/src/nvim/testdir/test_arglist.vim @@ -297,6 +297,18 @@ func Test_argdelete() %argd endfunc +func Test_argdelete_completion() + args foo bar + + call feedkeys(":argdelete \<C-A>\<C-B>\"\<CR>", 'tx') + call assert_equal('"argdelete bar foo', @:) + + call feedkeys(":argdelete x \<C-A>\<C-B>\"\<CR>", 'tx') + call assert_equal('"argdelete x bar foo', @:) + + %argd +endfunc + " Tests for the :next, :prev, :first, :last, :rewind commands func Test_argpos() call Reset_arglist() diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index b0a1ea0225..5d4a0ff3cb 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -596,3 +596,7 @@ func Test_script_detection() filetype off endfunc +func Test_setfiletype_completion() + call feedkeys(":setfiletype java\<C-A>\<C-B>\"\<CR>", 'tx') + call assert_equal('"setfiletype java javacc javascript', @:) +endfunc diff --git a/src/nvim/testdir/test_history.vim b/src/nvim/testdir/test_history.vim index ca31e3f06c..16aad9889e 100644 --- a/src/nvim/testdir/test_history.vim +++ b/src/nvim/testdir/test_history.vim @@ -104,3 +104,8 @@ function Test_Search_history_window() call assert_equal('a', @/) bwipe! endfunc + +function Test_history_completion() + call feedkeys(":history \<C-A>\<C-B>\"\<CR>", 'tx') + call assert_equal('"history / : = > ? @ all cmd debug expr input search', @:) +endfunc diff --git a/src/nvim/testdir/test_messages.vim b/src/nvim/testdir/test_messages.vim index 188406e440..12101ec1f8 100644 --- a/src/nvim/testdir/test_messages.vim +++ b/src/nvim/testdir/test_messages.vim @@ -38,3 +38,8 @@ function Test_messages() let &more = oldmore endtry endfunction + +func Test_message_completion() + call feedkeys(":message \<C-A>\<C-B>\"\<CR>", 'tx') + call assert_equal('"message clear', @:) +endfunc diff --git a/src/nvim/testdir/test_syntax.vim b/src/nvim/testdir/test_syntax.vim index e70d9b7c66..6978faeb7b 100644 --- a/src/nvim/testdir/test_syntax.vim +++ b/src/nvim/testdir/test_syntax.vim @@ -114,6 +114,15 @@ func Test_syntime() bd endfunc +func Test_syntime_completion() + if !has('profile') + return + endif + + call feedkeys(":syntime \<C-A>\<C-B>\"\<CR>", 'tx') + call assert_equal('"syntime clear off on report', @:) +endfunc + func Test_syntax_list() syntax on let a = execute('syntax list') |