summaryrefslogtreecommitdiff
path: root/src/testdir/test_vim9_cmd.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_vim9_cmd.vim')
-rw-r--r--src/testdir/test_vim9_cmd.vim23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index 2f8fd71e9..ef0a5fe2e 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -328,6 +328,29 @@ def Test_method_call_linebreak()
assert_equal([1, 2, 3], res)
END
CheckScriptSuccess(lines)
+
+ lines =<< trim END
+ new
+ var name = [1, 2]
+ name
+ ->copy()
+ ->setline(1)
+ assert_equal(['1', '2'], getline(1, 2))
+ bwipe!
+ END
+ CheckDefAndScriptSuccess(lines)
+
+ lines =<< trim END
+ new
+ g:shortlist
+ ->copy()
+ ->setline(1)
+ assert_equal(['1', '2'], getline(1, 2))
+ bwipe!
+ END
+ g:shortlist = [1, 2]
+ CheckDefAndScriptSuccess(lines)
+ unlet g:shortlist
enddef
def Test_method_call_whitespace()