aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-05-31 05:50:57 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-05-31 05:52:53 +0800
commit2de12e9bd7fe72eb4656a3c0f689caf6ce971451 (patch)
treea64ec7e199444fa8138698c832775a9ebeaf71c0 /test
parentdf2c3b204b9622687d0cd7dd59cbd3f89d9383ce (diff)
downloadrneovim-2de12e9bd7fe72eb4656a3c0f689caf6ce971451.tar.gz
rneovim-2de12e9bd7fe72eb4656a3c0f689caf6ce971451.tar.bz2
rneovim-2de12e9bd7fe72eb4656a3c0f689caf6ce971451.zip
vim-patch:9.1.0451: No test for escaping '<' with shellescape()
Problem: No test for escaping '<' with shellescape() Solution: Add a test. Use memcpy() in code to make it easier to understand. Fix a typo (zeertzjq). closes: vim/vim#14876 https://github.com/vim/vim/commit/88c8c547d5fc380e5685c2b01ec564ccdf9b259a
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_shell.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/old/testdir/test_shell.vim b/test/old/testdir/test_shell.vim
index baaa327965..c2320d8f39 100644
--- a/test/old/testdir/test_shell.vim
+++ b/test/old/testdir/test_shell.vim
@@ -119,6 +119,10 @@ func Test_shellescape()
call assert_equal("'te\\#xt'", shellescape("te#xt", 1))
call assert_equal("'te!xt'", shellescape("te!xt"))
call assert_equal("'te\\!xt'", shellescape("te!xt", 1))
+ call assert_equal("'te<cword>xt'", shellescape("te<cword>xt"))
+ call assert_equal("'te\\<cword>xt'", shellescape("te<cword>xt", 1))
+ call assert_equal("'te<cword>%xt'", shellescape("te<cword>%xt"))
+ call assert_equal("'te\\<cword>\\%xt'", shellescape("te<cword>%xt", 1))
call assert_equal("'te\nxt'", shellescape("te\nxt"))
call assert_equal("'te\\\nxt'", shellescape("te\nxt", 1))