diff src/testdir/test_functions.vim @ 31004:eb145a4d6bf8 v9.0.0837

patch 9.0.0837: append() reports failure when not appending anything Commit: https://github.com/vim/vim/commit/cd9c8d400c1eb9cbb4ff6a33be02f91a30ab13b2 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 5 23:46:43 2022 +0000 patch 9.0.0837: append() reports failure when not appending anything Problem: append() reports failure when not appending anything. Solution: Only report failure when appending something. (closes https://github.com/vim/vim/issues/11498)
author Bram Moolenaar <Bram@vim.org>
date Sun, 06 Nov 2022 01:00:04 +0100
parents a09404dad917
children 1a32f1a4f823
line wrap: on
line diff
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -939,9 +939,13 @@ endfunc
 func Test_append()
   enew!
   split
-  call append(0, ["foo"])
-  call append(1, [])
-  call append(1, test_null_list())
+  call assert_equal(0, append(1, []))
+  call assert_equal(0, append(1, test_null_list()))
+  call assert_equal(0, append(0, ["foo"]))
+  call assert_equal(0, append(1, []))
+  call assert_equal(0, append(1, test_null_list()))
+  call assert_equal(0, append(8, []))
+  call assert_equal(0, append(9, test_null_list()))
   call assert_equal(['foo', ''], getline(1, '$'))
   split
   only