diff options
author | erw7 <erw7.github@gmail.com> | 2019-05-29 12:06:39 +0900 |
---|---|---|
committer | erw7 <erw7.github@gmail.com> | 2019-05-29 12:54:42 +0900 |
commit | bfc44a91acdfb968cb3d0d21effc4ea9cbcd09e1 (patch) | |
tree | db93be271b130d3e328373ee9b895d2b711ea8ff /src/nvim/testdir | |
parent | d46aaa074640ef92382e5800297b7c76ed7574da (diff) | |
download | rneovim-bfc44a91acdfb968cb3d0d21effc4ea9cbcd09e1.tar.gz rneovim-bfc44a91acdfb968cb3d0d21effc4ea9cbcd09e1.tar.bz2 rneovim-bfc44a91acdfb968cb3d0d21effc4ea9cbcd09e1.zip |
vim-patch:8.1.1114: confusing overloaded operator "." for string concatenation
Problem: Confusing overloaded operator "." for string concatenation.
Solution: Add ".." for string concatenation. Also "let a ..= b".
https://github.com/vim/vim/commit/0f248b006c2574abc00c9aa7886d8f33620eb822
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_eval_stuff.vim | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_eval_stuff.vim b/src/nvim/testdir/test_eval_stuff.vim index 1850fb0cf1..19a15590e5 100644 --- a/src/nvim/testdir/test_eval_stuff.vim +++ b/src/nvim/testdir/test_eval_stuff.vim @@ -49,3 +49,32 @@ func Test_line_continuation() "\ and some more call assert_equal([5, 6], array) endfunc + +func Test_string_concatenation() + call assert_equal('ab', 'a'.'b') + call assert_equal('ab', 'a' .'b') + call assert_equal('ab', 'a'. 'b') + call assert_equal('ab', 'a' . 'b') + + call assert_equal('ab', 'a'..'b') + call assert_equal('ab', 'a' ..'b') + call assert_equal('ab', 'a'.. 'b') + call assert_equal('ab', 'a' .. 'b') + + let a = 'a' + let b = 'b' + let a .= b + call assert_equal('ab', a) + + let a = 'a' + let a.=b + call assert_equal('ab', a) + + let a = 'a' + let a ..= b + call assert_equal('ab', a) + + let a = 'a' + let a..=b + call assert_equal('ab', a) +endfunc |