Mercurial > vim
comparison src/testdir/test_vim9_expr.vim @ 19872:8a7bede7b138 v8.2.0492
patch 8.2.0492: Vim9: some error messages not tested
Commit: https://github.com/vim/vim/commit/a8c1770469504ae66c80bbdb03b6b31641215848
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Apr 1 21:17:24 2020 +0200
patch 8.2.0492: Vim9: some error messages not tested
Problem: Vim9: some error messages not tested.
Solution: Add more tests. Remove dead code. Fix uncovered bugs.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 01 Apr 2020 21:30:03 +0200 |
parents | 37c4779ca8f5 |
children | bd4f91762d0f |
comparison
equal
deleted
inserted
replaced
19871:7f8a267721e4 | 19872:8a7bede7b138 |
---|---|
104 func Test_expr2_fails() | 104 func Test_expr2_fails() |
105 let msg = "white space required before and after '||'" | 105 let msg = "white space required before and after '||'" |
106 call CheckDefFailure("let x = 1||2", msg) | 106 call CheckDefFailure("let x = 1||2", msg) |
107 call CheckDefFailure("let x = 1 ||2", msg) | 107 call CheckDefFailure("let x = 1 ||2", msg) |
108 call CheckDefFailure("let x = 1|| 2", msg) | 108 call CheckDefFailure("let x = 1|| 2", msg) |
109 | |
110 call CheckDefFailure("let x = 1 || xxx", 'E1001:') | |
109 endfunc | 111 endfunc |
110 | 112 |
111 " test && | 113 " test && |
112 def Test_expr3() | 114 def Test_expr3() |
113 assert_equal(0, 2 && 0) | 115 assert_equal(0, 2 && 0) |
875 | 877 |
876 call CheckDefFailure("let x = { -> 123) }", "E451:") | 878 call CheckDefFailure("let x = { -> 123) }", "E451:") |
877 call CheckDefFailure("let x = 123->{x -> x + 5) }", "E451:") | 879 call CheckDefFailure("let x = 123->{x -> x + 5) }", "E451:") |
878 | 880 |
879 call CheckDefFailure("let x = ¬exist", 'E113:') | 881 call CheckDefFailure("let x = ¬exist", 'E113:') |
880 call CheckDefExecFailure("&grepprg = [343]", 'E1051:') | 882 call CheckDefFailure("&grepprg = [343]", 'E1013:') |
881 | 883 |
882 call CheckDefExecFailure("echo s:doesnt_exist", 'E121:') | 884 call CheckDefExecFailure("echo s:doesnt_exist", 'E121:') |
883 call CheckDefExecFailure("echo g:doesnt_exist", 'E121:') | 885 call CheckDefExecFailure("echo g:doesnt_exist", 'E121:') |
884 | 886 |
885 call CheckDefFailure("echo a:somevar", 'E1075:') | 887 call CheckDefFailure("echo a:somevar", 'E1075:') |