diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-05-21 22:15:31 +0100 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-08-12 17:16:33 +0100 |
commit | e0bdc9b89c336a15e77639eef1c9087808292f36 (patch) | |
tree | 22d47e4c51f4b78895c74656cfafcf3001fa23b7 /test | |
parent | 7d2233fad007a3dd42481f8ffc01e69b57a17f9e (diff) | |
download | rneovim-e0bdc9b89c336a15e77639eef1c9087808292f36.tar.gz rneovim-e0bdc9b89c336a15e77639eef1c9087808292f36.tar.bz2 rneovim-e0bdc9b89c336a15e77639eef1c9087808292f36.zip |
fix(eval): cherry-pick emsg changes from v8.1.0736
v8.1.0736 made some changes for making some emsgs more specific.
Includes the change for Test_lambda_fails() in test_lambda.vim.
Adjust relevant functionaltests to expect the new emsgs.
This patch has been fully ported in my Blob port PR, but it hasn't been
merged yet, so just use what we need from it for now.
Required for v8.1.1821.
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/core/startup_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/eval/null_spec.lua | 6 | ||||
-rw-r--r-- | test/functional/provider/clipboard_spec.lua | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index 997e600671..f3ab420603 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -247,9 +247,9 @@ describe('startup', function() [[" -u NONE -i NONE --cmd "set noruler" --cmd "let g:foo = g:bar"')]]) screen:expect([[ ^ | + | Error detected while processing pre-vimrc command line: | E121: Undefined variable: g:bar | - E15: Invalid expression: g:bar | Press ENTER or type command to continue | | ]]) diff --git a/test/functional/eval/null_spec.lua b/test/functional/eval/null_spec.lua index b1ceff9115..f866aca3ed 100644 --- a/test/functional/eval/null_spec.lua +++ b/test/functional/eval/null_spec.lua @@ -53,7 +53,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\nE15: Invalid expression: L[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) @@ -68,7 +68,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\nE15: Invalid expression: L[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) @@ -135,7 +135,7 @@ describe('NULL', function() end) describe('dict', function() it('does not crash when indexing NULL dict', function() - eq('\nE716: Key not present in Dictionary: "test"\nE15: Invalid expression: v:_null_dict.test', + eq('\nE716: Key not present in Dictionary: "test"', redir_exec('echo v:_null_dict.test')) end) null_expr_test('makes extend error out', 'extend(D, {})', 'E742: Cannot change value of extend() argument', 0) diff --git a/test/functional/provider/clipboard_spec.lua b/test/functional/provider/clipboard_spec.lua index e5e21f11a6..986db96a18 100644 --- a/test/functional/provider/clipboard_spec.lua +++ b/test/functional/provider/clipboard_spec.lua @@ -653,14 +653,12 @@ describe('clipboard (with fake clipboard.vim)', function() '', '', 'E121: Undefined variable: doesnotexist', - 'E15: Invalid expression: doesnotexist', }, 'v'}, eval("g:test_clip['*']")) feed_command(':echo "Howdy!"') eq({{ '', '', 'E121: Undefined variable: doesnotexist', - 'E15: Invalid expression: doesnotexist', '', 'Howdy!', }, 'v'}, eval("g:test_clip['*']")) |