]> granicus.if.org Git - vim/commitdiff
patch 8.2.1803: a few failures are not tested v8.2.1803
authorBram Moolenaar <Bram@vim.org>
Mon, 5 Oct 2020 18:07:18 +0000 (20:07 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 5 Oct 2020 18:07:18 +0000 (20:07 +0200)
Problem:    A few failures are not tested.
Solution:   Test a few failures. (Dominique PellĂ©, closes #7075)

src/testdir/test_arglist.vim
src/testdir/test_cmdline.vim
src/testdir/test_json.vim
src/testdir/test_listdict.vim
src/version.c

index 615d8167b31a682062a96749f3747e1108530c03..f45a0d4d0b8cac89b5a46a2afb603f86cd8010e3 100644 (file)
@@ -426,6 +426,7 @@ func Test_argdelete()
   call assert_fails('argdelete', 'E610:')
   call assert_fails('1,100argdelete', 'E16:')
   call assert_fails('argdel /\)/', 'E55:')
+  call assert_fails('1argdel 1', 'E474:')
 
   call Reset_arglist()
   args a b c d
@@ -478,13 +479,16 @@ func Test_arglist_autocmd()
   new
   " redefine arglist; go to Xxx1
   next! Xxx1 Xxx2 Xxx3
-  " open window for all args
+  " open window for all args; Reading Xxx2 will change the arglist and the
+  " third window will get Xxx1:
+  "   win 1: Xxx1
+  "   win 2: Xxx2
+  "   win 3: Xxx1
   all
   call assert_equal('test file Xxx1', getline(1))
   wincmd w
   wincmd w
   call assert_equal('test file Xxx1', getline(1))
-  " should now be in Xxx2
   rewind
   call assert_equal('test file Xxx2', getline(1))
 
index 026625e0243c8eb109d46b1c58964b0ed870b9c8..9557828caecc4d1de111d2aa7c29a33d1e13a344 100644 (file)
@@ -756,6 +756,10 @@ func Test_cmdline_complete_various()
   call feedkeys(":doautocmd User MyCmd a.c\<C-A>\<C-B>\"\<CR>", 'xt')
   call assert_equal("\"doautocmd User MyCmd a.c\<C-A>", @:)
 
+  " completion of autocmd group after comma
+  call feedkeys(":doautocmd BufNew,BufEn\<C-A>\<C-B>\"\<CR>", 'xt')
+  call assert_equal("\"doautocmd BufNew,BufEnter", @:)
+
   " completion for the :augroup command
   augroup XTest
   augroup END
index 93597cbf6cbe9a36f4bbf34ef09be966b8aa8871..f881ededf971643bf3baa1c2140bab05c37d641e 100644 (file)
@@ -196,6 +196,7 @@ func Test_json_decode()
   call assert_fails('call json_decode("{[]:42}")', "E491:")
 
   call assert_fails('call json_decode("-")', "E491:")
+  call assert_fails('call json_decode("-1x")', "E491:")
   call assert_fails('call json_decode("infinit")', "E491:")
 
   call assert_fails('call json_decode("\"\\u111Z\"")', 'E491:')
index 63fa04ef9fb1ddfed4861266f50f3c738411d495..54486ff49a057371a89ac67aeaef42f321587e1f 100644 (file)
@@ -726,6 +726,8 @@ func Test_reduce()
   call assert_fails("call reduce({}, { acc, val -> acc + val }, 1)", 'E897:')
   call assert_fails("call reduce(0, { acc, val -> acc + val }, 1)", 'E897:')
   call assert_fails("call reduce('', { acc, val -> acc + val }, 1)", 'E897:')
+  call assert_fails("call reduce([1, 2], 'Xdoes_not_exist')", 'E117:')
+  call assert_fails("echo reduce(0z01, { acc, val -> 2 * acc + val }, '')", 'E39:')
 
   let g:lut = [1, 2, 3, 4]
   func EvilRemove()
index 244c26d09fa564ad6fdb13d0427ce725c19b7bc9..e4bc870cc2b28b2527c6f87236efe6316534e652 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1803,
 /**/
     1802,
 /**/