diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-12-04 21:39:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-04 21:39:18 +0100 |
commit | c07e48a900bb8b6d865eb6c65ae0f6fb9f96322e (patch) | |
tree | 3fd95df15dc1b844324ddab0226ba93aad3bc675 | |
parent | d207440f1e739172477083078d4a6fe7858e772b (diff) | |
parent | abd32c1bb8c01725291a8de2a691b89ee7050012 (diff) | |
download | rneovim-c07e48a900bb8b6d865eb6c65ae0f6fb9f96322e.tar.gz rneovim-c07e48a900bb8b6d865eb6c65ae0f6fb9f96322e.tar.bz2 rneovim-c07e48a900bb8b6d865eb6c65ae0f6fb9f96322e.zip |
vim-patch:8.1.0559: command line completion not sufficiently tested (#9310)
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') |