summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_vim9_cmd.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-08 22:45:35 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-08 22:45:35 +0200
commitc3516f7e4507c77424b94cb89071f6d0841f4e6a (patch)
tree08b13ec0f9f8b88e0ec8cbab01899960dae3423b /src/testdir/test_vim9_cmd.vim
parent6defa7bf0a8935cc44f3dc12e9c87bbb40f190b7 (diff)
patch 8.2.1637: Vim9: :put ={expr} does not work inside :def functionv8.2.1637
Problem: Vim9: :put ={expr} does not work inside :def function. Solution: Add ISN_PUT. (closes #6397)
Diffstat (limited to 'src/testdir/test_vim9_cmd.vim')
-rw-r--r--src/testdir/test_vim9_cmd.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index 9372d90952..4b4e58e943 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -315,5 +315,21 @@ def Test_normal_command()
bwipe!
enddef
+def Test_put_command()
+ new
+ @p = 'ppp'
+ put p
+ assert_equal('ppp', getline(2))
+
+ put ='below'
+ assert_equal('below', getline(3))
+ put! ='above'
+ assert_equal('above', getline(3))
+ assert_equal('below', getline(4))
+
+ bwipe!
+enddef
+
+
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker