aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-03-08 02:04:08 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-03-08 02:12:12 -0500
commite428fc4b52d986fec0d544e371b05e8c7e18db93 (patch)
treea1d879b3bb7e31f7962687abe18d88dcb1a3e547 /src
parentaa985f4a7c6efa42d3ad91c7f66048e3c1b73f5c (diff)
downloadrneovim-e428fc4b52d986fec0d544e371b05e8c7e18db93.tar.gz
rneovim-e428fc4b52d986fec0d544e371b05e8c7e18db93.tar.bz2
rneovim-e428fc4b52d986fec0d544e371b05e8c7e18db93.zip
oldtests: set shellslash in Test_shellescape()
Value of "&shell" does not affect "shellescape()".
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_functions.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index bfe13d6b2d..824baffbc9 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -956,8 +956,8 @@ func Test_balloon_show()
endfunc
func Test_shellescape()
- let save_shell = &shell
- set shell=bash
+ let [save_shell, save_shellslash] = [&shell, &shellslash]
+ set shell=bash shellslash
call assert_equal("'text'", shellescape('text'))
call assert_equal("'te\"xt'", shellescape('te"xt'))
call assert_equal("'te'\\''xt'", shellescape("te'xt"))
@@ -971,13 +971,13 @@ func Test_shellescape()
call assert_equal("'te\nxt'", shellescape("te\nxt"))
call assert_equal("'te\\\nxt'", shellescape("te\nxt", 1))
- set shell=tcsh
+ set shell=tcsh shellslash
call assert_equal("'te\\!xt'", shellescape("te!xt"))
call assert_equal("'te\\\\!xt'", shellescape("te!xt", 1))
call assert_equal("'te\\\nxt'", shellescape("te\nxt"))
call assert_equal("'te\\\\\nxt'", shellescape("te\nxt", 1))
- let &shell = save_shell
+ let [&shell, &shellslash] = [save_shell, save_shellslash]
endfunc
func Test_redo_in_nested_functions()