diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-21 20:43:17 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-21 20:43:17 +0200 |
commit | 3fc71285d5ae7c16cf7be5d997fd1fe140f196da (patch) | |
tree | 9d505305858192627564767b9c071a41fcd9d336 /src/testdir/test_vim9_expr.vim | |
parent | 5d72ce69c8783fd8f1a0355c00806c5084010eec (diff) | |
download | vim-git-3fc71285d5ae7c16cf7be5d997fd1fe140f196da.tar.gz |
patch 8.2.1501: Vim9: concatenating to constant reverses orderv8.2.1501
Problem: Vim9: concatenating to constant reverses order.
Solution: Generate constant before option, register and environment
variable. (closes #6757)
Diffstat (limited to 'src/testdir/test_vim9_expr.vim')
-rw-r--r-- | src/testdir/test_vim9_expr.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim index 2c88efbac..312eddfae 100644 --- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -944,6 +944,18 @@ def Test_expr5() + g:ablob) assert_equal(0z01ab3344, g:ablob + 0z3344) assert_equal(0z01ab01ab, g:ablob + g:ablob) + + # concatenate non-constant to constant + let save_path = &path + &path = 'b' + assert_equal('ab', 'a' .. &path) + &path = save_path + + @b = 'b' + assert_equal('ab', 'a' .. @b) + + $ENVVAR = 'env' + assert_equal('aenv', 'a' .. $ENVVAR) enddef def Test_expr5_vim9script() |