From 88cfb49bee3c9102082c7010acb92244e4ad1348 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 5 May 2023 07:14:39 +0800 Subject: vim-patch:8.2.4890: inconsistent capitalization in error messages Problem: Inconsistent capitalization in error messages. Solution: Make capitalization consistent. (Doug Kearns) https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa Co-authored-by: Bram Moolenaar --- test/functional/vimscript/null_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/vimscript/null_spec.lua') diff --git a/test/functional/vimscript/null_spec.lua b/test/functional/vimscript/null_spec.lua index 1153baac46..4ba5dd6b45 100644 --- a/test/functional/vimscript/null_spec.lua +++ b/test/functional/vimscript/null_spec.lua @@ -65,7 +65,7 @@ describe('NULL', function() -- Correct behaviour null_expr_test('can be indexed with error message for empty list', 'L[0]', - 'E684: list index out of range: 0', nil) + 'E684: List index out of range: 0', nil) null_expr_test('can be splice-indexed', 'L[:]', 0, {}) null_expr_test('is not locked', 'islocked("v:_null_list")', 0, 0) null_test('is accepted by :for', 'for x in L|throw x|endfor', 0) @@ -80,7 +80,7 @@ describe('NULL', function() null_expr_test('can be copied', 'copy(L)', 0, {}) null_expr_test('can be deepcopied', 'deepcopy(L)', 0, {}) null_expr_test('does not crash when indexed', 'L[1]', - 'E684: list index out of range: 1', nil) + 'E684: List index out of range: 1', nil) null_expr_test('does not crash call()', 'call("arglistid", L)', 0, 0) null_expr_test('does not crash col()', 'col(L)', 0, 0) null_expr_test('does not crash virtcol()', 'virtcol(L)', 0, 0) -- cgit From 3cbb02ce77087a820decd1a724a6e8b666e0ca36 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 12 Oct 2023 07:38:56 +0800 Subject: vim-patch:8.2.3064: Vim9: in script cannot set item in uninitialized list (#25605) Problem: Vim9: in script cannot set item in uninitialized list. Solution: When a list is NULL allocate an empty one. (closes vim/vim#8461) https://github.com/vim/vim/commit/e65081d1b591f16dc6e380a830d87565c5eb7b03 Co-authored-by: Bram Moolenaar --- test/functional/vimscript/null_spec.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'test/functional/vimscript/null_spec.lua') diff --git a/test/functional/vimscript/null_spec.lua b/test/functional/vimscript/null_spec.lua index 4ba5dd6b45..d4c36d835b 100644 --- a/test/functional/vimscript/null_spec.lua +++ b/test/functional/vimscript/null_spec.lua @@ -53,17 +53,13 @@ describe('NULL', function() end) end describe('list', function() - -- Incorrect behaviour - -- FIXME Should error out with different message - null_test('makes :unlet act as if it is not a list', ':unlet L[0]', - 'Vim(unlet):E689: Can only index a List, Dictionary or Blob') - -- Subjectable behaviour - null_expr_test('is equal to empty list', 'L == []', 0, 1) null_expr_test('is equal to empty list (reverse order)', '[] == L', 0, 1) -- Correct behaviour + null_test('can be :unlet item with error message for empty list', ':unlet L[0]', + 'Vim(unlet):E684: List index out of range: 0') null_expr_test('can be indexed with error message for empty list', 'L[0]', 'E684: List index out of range: 0', nil) null_expr_test('can be splice-indexed', 'L[:]', 0, {}) -- cgit