diff options
Diffstat (limited to 'test/old/testdir/test_let.vim')
-rw-r--r-- | test/old/testdir/test_let.vim | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/test/old/testdir/test_let.vim b/test/old/testdir/test_let.vim index bf119bdeab..a9cc8a14a4 100644 --- a/test/old/testdir/test_let.vim +++ b/test/old/testdir/test_let.vim @@ -242,7 +242,7 @@ func Test_let_no_type_checking() endfunc func Test_let_termcap() - throw 'skipped: Nvim does not support termcap option' + throw 'Skipped: Nvim does not support termcap options' " Terminal code let old_t_te = &t_te let &t_te = "\<Esc>[yes;" @@ -257,25 +257,45 @@ func Test_let_termcap() let &t_k1 = old_t_k1 endif - call assert_fails('let x = &t_xx', 'E113') + 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', 'E113') + call assert_fails('let x = &t_xx', 'E113:') endfunc func Test_let_option_error() let _w = &tw let &tw = 80 - call assert_fails('let &tw .= 1', 'E734') + call assert_fails('let &tw .= 1', ['E734:', 'E734:']) + call assert_fails('let &tw .= []', ['E734:', 'E734:']) + call assert_fails('let &tw = []', ['E745:', 'E745:']) + call assert_fails('let &tw += []', ['E745:', 'E745:']) call assert_equal(80, &tw) let &tw = _w + let _w = &autoread + let &autoread = 1 + call assert_fails('let &autoread .= 1', ['E734:', 'E734:']) + call assert_fails('let &autoread .= []', ['E734:', 'E734:']) + call assert_fails('let &autoread = []', ['E745:', 'E745:']) + call assert_fails('let &autoread += []', ['E745:', 'E745:']) + call assert_equal(1, &autoread) + let &autoread = _w + let _w = &fillchars let &fillchars = "vert:|" - call assert_fails('let &fillchars += "diff:-"', 'E734') + call assert_fails('let &fillchars += "diff:-"', ['E734:', 'E734:']) + call assert_fails('let &fillchars += []', ['E734:', 'E734:']) + call assert_fails('let &fillchars = []', ['E730:', 'E730:']) + call assert_fails('let &fillchars .= []', ['E730:', 'E730:']) call assert_equal("vert:|", &fillchars) let &fillchars = _w + + call assert_fails('let &nosuchoption = 1', ['E355:', 'E355:']) + call assert_fails('let &nosuchoption = ""', ['E355:', 'E355:']) + call assert_fails('let &nosuchoption = []', ['E355:', 'E355:']) + call assert_fails('let &t_xx = []', ['E730:', 'E730:']) endfunc " Errors with the :let statement |