Mercurial > vim
diff src/testdir/test_vim9_expr.vim @ 19860:37c4779ca8f5 v8.2.0486
patch 8.2.0486: Vim9: some code and error messages not tested
Commit: https://github.com/vim/vim/commit/9be61bbb170ed3df0e408c8ac12516e772dc0b75
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 30 22:51:24 2020 +0200
patch 8.2.0486: Vim9: some code and error messages not tested
Problem: Vim9: some code and error messages not tested.
Solution: Add more tests.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 30 Mar 2020 23:00:05 +0200 |
parents | 90eec641cc8c |
children | 8a7bede7b138 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -58,6 +58,7 @@ enddef func Test_expr1_fails() call CheckDefFailure("let x = 1 ? 'one'", "Missing ':' after '?'") + call CheckDefFailure("let x = 1 ? 'one' : xxx", "E1001:") let msg = "white space required before and after '?'" call CheckDefFailure("let x = 1? 'one' : 'two'", msg) @@ -192,11 +193,18 @@ def Test_expr4_equal() assert_equal(true, g:astring == 'asdf') assert_equal(false, 'xyz' == g:astring) + assert_equal(false, 'abc' == 'aBc') + assert_equal(false, 'abc' ==# 'aBc') + assert_equal(true, 'abc' ==? 'aBc') + assert_equal(false, 'abc' == 'ABC') set ignorecase assert_equal(false, 'abc' == 'ABC') + assert_equal(false, 'abc' ==# 'ABC') set noignorecase + call CheckDefFailure("let x = 'a' == xxx", 'E1001:') + assert_equal(true, 0z3f == 0z3f) assert_equal(false, 0z3f == 0z4f) assert_equal(true, g:ablob == 0z01ab)