mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
oldtests: set shellslash in Test_shellescape()
Value of "&shell" does not affect "shellescape()".
This commit is contained in:
parent
aa985f4a7c
commit
e428fc4b52
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user