aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_functions.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-19 17:57:09 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-08-19 18:05:46 +0800
commitfcd729f22c658826024467801ae4ba0a92a8fabc (patch)
tree9fd8d4342f77ed25e5abba5f697a827b3f3de38b /test/old/testdir/test_functions.vim
parent4c7df98e4eeed20f8a9c461729935b79743d7752 (diff)
downloadrneovim-fcd729f22c658826024467801ae4ba0a92a8fabc.tar.gz
rneovim-fcd729f22c658826024467801ae4ba0a92a8fabc.tar.bz2
rneovim-fcd729f22c658826024467801ae4ba0a92a8fabc.zip
vim-patch:9.0.1540: reverse() on string doesn't work in compiled function
Problem: reverse() on string doesn't work in compiled function. Solution: Accept string in argument type check. (Yegappan Lakshmanan, closes vim/vim#12377) https://github.com/vim/vim/commit/f9dc278946d52235a0025fd347bd9ff571258470 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'test/old/testdir/test_functions.vim')
-rw-r--r--test/old/testdir/test_functions.vim17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim
index dbd1119350..4ad01c8531 100644
--- a/test/old/testdir/test_functions.vim
+++ b/test/old/testdir/test_functions.vim
@@ -3150,13 +3150,16 @@ endfunc
" Test for the reverse() function with a string
func Test_string_reverse()
- call assert_equal('', reverse(v:_null_string))
- for [s1, s2] in [['', ''], ['a', 'a'], ['ab', 'ba'], ['abc', 'cba'],
- \ ['abcd', 'dcba'], ['«-«-»-»', '»-»-«-«'],
- \ ['🇦', '🇦'], ['🇦🇧', '🇧🇦'], ['🇦🇧🇨', '🇨🇧🇦'],
- \ ['🇦«🇧-🇨»🇩', '🇩»🇨-🇧«🇦']]
- call assert_equal(s2, reverse(s1))
- endfor
+ let lines =<< trim END
+ call assert_equal('', reverse(v:_null_string))
+ for [s1, s2] in [['', ''], ['a', 'a'], ['ab', 'ba'], ['abc', 'cba'],
+ \ ['abcd', 'dcba'], ['«-«-»-»', '»-»-«-«'],
+ \ ['🇦', '🇦'], ['🇦🇧', '🇧🇦'], ['🇦🇧🇨', '🇨🇧🇦'],
+ \ ['🇦«🇧-🇨»🇩', '🇩»🇨-🇧«🇦']]
+ call assert_equal(s2, reverse(s1))
+ endfor
+ END
+ call CheckLegacyAndVim9Success(lines)
" test in latin1 encoding
let save_enc = &encoding