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.
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index b1efbf5..06c200d 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -58,6 +58,7 @@
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 @@
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)