diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-12-06 16:49:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 16:49:40 +0800 |
commit | f22e9e10f9ad77d2cce7f52837c5724877505a08 (patch) | |
tree | 0ef7ab588500f2d731fccd3a7aa43c9e51e1be32 /test | |
parent | 401ce9f3fdebed05a929de1b94e55c74d45e2ffb (diff) | |
download | rneovim-f22e9e10f9ad77d2cce7f52837c5724877505a08.tar.gz rneovim-f22e9e10f9ad77d2cce7f52837c5724877505a08.tar.bz2 rneovim-f22e9e10f9ad77d2cce7f52837c5724877505a08.zip |
vim-patch:8.2.3695: confusing error for missing key (#26420)
Problem: Confusing error for missing key.
Solution: Use the actualy key for the error. (closes vim/vim#9241)
https://github.com/vim/vim/commit/5c1ec439f0a69e9aa7ece9bbb7d916f48f58be1e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_listdict.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/old/testdir/test_listdict.vim b/test/old/testdir/test_listdict.vim index fef7c6a9bc..33b8d55982 100644 --- a/test/old/testdir/test_listdict.vim +++ b/test/old/testdir/test_listdict.vim @@ -456,6 +456,25 @@ func Test_dict_func_remove() call CheckLegacyAndVim9Failure(lines, 'E716:') let lines =<< trim END + let d = {'a-b': 55} + echo d.a-b + END + call CheckScriptFailure(lines, 'E716: Key not present in Dictionary: "a"') + + let lines =<< trim END + vim9script + var d = {'a-b': 55} + echo d.a-b + END + call CheckScriptFailure(lines, 'E716: Key not present in Dictionary: "a"') + + let lines =<< trim END + var d = {'a-b': 55} + echo d.a-b + END + call CheckDefFailure(lines, 'E1004: White space required before and after ''-''') + + let lines =<< trim END let d = {1: 'a', 3: 'c'} call remove(d, []) END |