summaryrefslogtreecommitdiff
path: root/src/testdir/test_vim9_builtin.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_vim9_builtin.vim')
-rw-r--r--src/testdir/test_vim9_builtin.vim12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim
index 9cae4a34e..b98c840ce 100644
--- a/src/testdir/test_vim9_builtin.vim
+++ b/src/testdir/test_vim9_builtin.vim
@@ -1104,7 +1104,7 @@ def Test_set_get_bufline()
assert_equal([], getbufline(b, 2, 1))
if has('job')
- setbufline(b, 2, [function('eval'), {key: 123}, test_null_job()])
+ setbufline(b, 2, [function('eval'), {key: 123}, string(test_null_job())])
assert_equal(["function('eval')",
"{'key': 123}",
"no process"],
@@ -1250,6 +1250,16 @@ def Test_submatch()
actual->assert_equal(expected)
enddef
+def Test_substitute()
+ var res = substitute('A1234', '\d', 'X', '')
+ assert_equal('AX234', res)
+
+ if has('job')
+ assert_fails('"text"->substitute(".*", () => job_start(":"), "")', 'E908: using an invalid value as a String: job')
+ assert_fails('"text"->substitute(".*", () => job_start(":")->job_getchannel(), "")', 'E908: using an invalid value as a String: channel')
+ endif
+enddef
+
def Test_synID()
new
setline(1, "text")