diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-04-24 19:08:24 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-04-24 19:08:24 +0200 |
commit | bdc0f1c6986e5d64f647e0924a4de795b47c549a (patch) | |
tree | d314ca4f02d7e8e13072ebef2ed4ba92be403083 /src/testdir/test_vim9_assign.vim | |
parent | 96cf4ba8fb96e5778192d2dab7458b9a7da0a49d (diff) |
patch 8.2.2806: Vim9: using "++nr" as a command might not workv8.2.2806
Problem: Vim9: using "++nr" as a command might not work.
Solution: Do not recognize "++" and "--" in a following line as addition or
subtraction.
Diffstat (limited to 'src/testdir/test_vim9_assign.vim')
-rw-r--r-- | src/testdir/test_vim9_assign.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_assign.vim b/src/testdir/test_vim9_assign.vim index a0175cd281..246284c86f 100644 --- a/src/testdir/test_vim9_assign.vim +++ b/src/testdir/test_vim9_assign.vim @@ -1837,5 +1837,21 @@ def Test_script_funcref_case() CheckScriptFailure(lines, 'E704:') enddef +def Test_inc_dec() + var lines =<< trim END + var nr = 7 + ++nr + echo nr + --nr + echo nr + + var ll = [1, 2] + --ll[0] + ++ll[1] + echo ll + END + CheckDefAndScriptSuccess(lines) +enddef + " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker |