aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorChristian Clason <christian.clason@uni-due.de>2021-09-12 10:55:35 +0200
committerGitHub <noreply@github.com>2021-09-12 10:55:35 +0200
commit4a7a99ff31557bea7da09466547ff2dc1e337729 (patch)
treeef233bd9f83e09e245f91c741c5b1819ffab6cdd /src/nvim/testdir
parentcd4ec810e9f60024518405f50991d34a2c5af325 (diff)
parentd3c6f1ebbb528dd526daa6b3cbf3007d65f2af17 (diff)
downloadrneovim-4a7a99ff31557bea7da09466547ff2dc1e337729.tar.gz
rneovim-4a7a99ff31557bea7da09466547ff2dc1e337729.tar.bz2
rneovim-4a7a99ff31557bea7da09466547ff2dc1e337729.zip
Merge pull request #15550 from jasonccox/vim-8.2.3385
vim-patch:8.2.3385,8.2.3393
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_functions.vim23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index ed46730cbb..e82fefc7fc 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -1172,6 +1172,29 @@ func Test_shellescape()
call assert_equal("'te\\\nxt'", shellescape("te\nxt"))
call assert_equal("'te\\\\\nxt'", shellescape("te\nxt", 1))
+ set shell=fish
+ call assert_equal("'text'", shellescape('text'))
+ call assert_equal("'te\"xt'", shellescape('te"xt'))
+ call assert_equal("'te'\\''xt'", shellescape("te'xt"))
+
+ call assert_equal("'te%xt'", shellescape("te%xt"))
+ 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!xt'", shellescape("te!xt"))
+ 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\\\\'\\''xt'", shellescape("te\\'xt"))
+ 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\\\\%xt'", shellescape("te\\%xt"))
+ 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))
+
let &shell = save_shell
endfunc