You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/testdir/test_vim9_builtin.vim
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -287,6 +287,10 @@ def Test_balloon_split()
287
287
assert_fails('balloon_split(true)', 'E1174:')
288
288
enddef
289
289
290
+
defTest_blob2list()
291
+
CheckDefAndScriptFailure2(['blob2list(10)'], 'E1013: Argument 1: type mismatch, expected blob but got number', 'E1238: Blob required for argument 1')
292
+
enddef
293
+
290
294
defTest_browse()
291
295
CheckFeature browse
292
296
@@ -572,6 +576,7 @@ def Test_char2nr()
572
576
assert_equal(97, char2nr('a', 0))
573
577
assert_equal(97, char2nr('a', true))
574
578
assert_equal(97, char2nr('a', false))
579
+
char2nr('')->assert_equal(0)
575
580
enddef
576
581
577
582
defTest_charclass()
@@ -786,6 +791,8 @@ def Test_escape()
786
791
CheckDefAndScriptFailure2(['escape(true, false)'], 'E1013: Argument 1: type mismatch, expected string but got bool', 'E1174: String required for argument 1')
787
792
CheckDefAndScriptFailure2(['escape("a", 10)'], 'E1013: Argument 2: type mismatch, expected string but got number', 'E1174: String required for argument 2')
788
793
assert_equal('a\:b', escape("a:b", ":"))
794
+
escape('abc', '')->assert_equal('abc')
795
+
escape('', ':')->assert_equal('')
789
796
enddef
790
797
791
798
defTest_eval()
@@ -1921,6 +1928,11 @@ def Test_lispindent()
1921
1928
assert_equal(0, lispindent(1))
1922
1929
enddef
1923
1930
1931
+
defTest_list2blob()
1932
+
CheckDefAndScriptFailure2(['list2blob(10)'], 'E1013: Argument 1: type mismatch, expected list<number> but got number', 'E1211: List required for argument 1')
1933
+
CheckDefFailure(['list2blob([0z10, 0z02])'], 'E1013: Argument 1: type mismatch, expected list<number> but got list<blob>')
0 commit comments