0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.2.1501: Vim9: concatenating to constant reverses order

Problem:    Vim9: concatenating to constant reverses order.
Solution:   Generate constant before option, register and environment
            variable. (closes #6757)
This commit is contained in:
Bram Moolenaar
2020-08-21 20:43:17 +02:00
parent 5d72ce69c8
commit 3fc71285d5
3 changed files with 23 additions and 3 deletions

View File

@@ -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()