diff options
-rw-r--r-- | src/nvim/testdir/test49.vim | 4 | ||||
-rw-r--r-- | src/nvim/testdir/test_assign.vim | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/nvim/testdir/test49.vim b/src/nvim/testdir/test49.vim index 103b282bc7..5468f7c4aa 100644 --- a/src/nvim/testdir/test49.vim +++ b/src/nvim/testdir/test49.vim @@ -3694,7 +3694,7 @@ endif if ExtraVim(msgfile) try Xpath 4194304 " X: 4194304 - let x = novar " error E121/E15; exception: E121 + let x = novar " error E121; exception: E121 catch /E15:/ " should not catch Xpath 8388608 " X: 0 endtry @@ -3702,7 +3702,7 @@ if ExtraVim(msgfile) endif Xpath 33554432 " X: 33554432 -if !MESSAGES('E121', "Undefined variable", 'E15', "Invalid expression") +if !MESSAGES('E121', "Undefined variable") Xpath 67108864 " X: 0 endif diff --git a/src/nvim/testdir/test_assign.vim b/src/nvim/testdir/test_assign.vim index 50415ad6fd..542b8469b7 100644 --- a/src/nvim/testdir/test_assign.vim +++ b/src/nvim/testdir/test_assign.vim @@ -25,11 +25,11 @@ func Test_let_termcap() let &t_k1 = old_t_k1 endif - call assert_fails('let x = &t_xx', 'E15') + call assert_fails('let x = &t_xx', 'E113') let &t_xx = "yes" call assert_equal("yes", &t_xx) let &t_xx = "" - call assert_fails('let x = &t_xx', 'E15') + call assert_fails('let x = &t_xx', 'E113') endfunc func Test_let_option_error() @@ -45,3 +45,11 @@ func Test_let_option_error() call assert_equal("vert:|", &fillchars) let &fillchars = _w endfunc + +func Test_let_errors() + let s = 'abcd' + call assert_fails('let s[1] = 5', 'E689:') + + let l = [1, 2, 3] + call assert_fails('let l[:] = 5', 'E709:') +endfunc |