]> granicus.if.org Git - vim/commitdiff
patch 8.1.0559: command line completion not sufficiently tested v8.1.0559
authorBram Moolenaar <Bram@vim.org>
Sun, 2 Dec 2018 13:55:08 +0000 (14:55 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 2 Dec 2018 13:55:08 +0000 (14:55 +0100)
Problem:    Command line completion not sufficiently tested.
Solution:   Add more tests. (Dominique Pelle, closes #3622)

src/testdir/test_arglist.vim
src/testdir/test_filetype.vim
src/testdir/test_history.vim
src/testdir/test_messages.vim
src/testdir/test_syntax.vim
src/version.c

index b896c3dec677867e9e26b94fd00412836cce5c75..cb1117eede023a057256514265cb26e080c3ce39 100644 (file)
@@ -396,6 +396,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()
index d146bd2ce19f44ee157a446f0bda8f454bfc0330..fd2f38355f32e497a6ce3d84c07cda88bb8ec383 100644 (file)
@@ -597,3 +597,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
index ca31e3f06c7319d8b2625cadd1f21e2f19213a6a..16aad9889e38b9b879d4cfe423631b77bffc6ada 100644 (file)
@@ -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
index a85799e2635de4f92077f309b0dabfa3cc5d62e5..de14b81f9a5812becce8c6e48801b18f4ebfd31a 100644 (file)
@@ -59,3 +59,8 @@ function! Test_stopinsert_does_not_break_message_output()
 
   set cmdheight&
 endfunction
+
+func Test_message_completion()
+  call feedkeys(":message \<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"message clear', @:)
+endfunc
index ffa8e9022b6b1c8a565accbdfb44475e1250e3fd..c0be4a0eff555de5bd6f50e5f36094973c37891f 100644 (file)
@@ -119,6 +119,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')
index b44f5b8850a1c16298923f7bb408367ff471231f..bbf32f5c3c8903fadc42db1f8678aeca99209cb2 100644 (file)
@@ -792,6 +792,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    559,
 /**/
     558,
 /**/