aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-08-20 22:01:58 +0200
committerGitHub <noreply@github.com>2019-08-20 22:01:58 +0200
commit7adea68c1eab6ba71344aa24aaf5026b824d7ea1 (patch)
tree49d47a8a3acacf20ce53237c0e2520901a3a2092
parent09397e5d059cf8bc2771c1c7ff2d172cba6df99a (diff)
downloadrneovim-7adea68c1eab6ba71344aa24aaf5026b824d7ea1.tar.gz
rneovim-7adea68c1eab6ba71344aa24aaf5026b824d7ea1.tar.bz2
rneovim-7adea68c1eab6ba71344aa24aaf5026b824d7ea1.zip
oldtest: windows: revert setting shellslash individually (#10189)
* Revert "oldtests: win: shellslash for cdpath,tags,:find" This reverts commit 6245b4873d5e24fade9aadadf32645bfb3ebfc31. * Revert "oldtests: set shellslash for ":cd" test" This reverts commit eba1ebafe554fcf6dcd8c933f53b43ca9c5b3b6a. * Revert "oldtests: set shellslash in Test_shellescape()" This reverts commit e428fc4b52d986fec0d544e371b05e8c7e18db93. * Revert "fixup! vim-patch:8.0.1782: no simple way to label quickfix entries" This reverts commit ac1fbc28601a05cdca19f868449c86b8dd70328c. * Revert "test/old: pass Test_statusline on Windows" This reverts commit 6efa3bff09afb0e54ad71278ac60259bf41be286. * Revert "oldtests: set shellslash for Test_non_zero_arg" This reverts commit 42e1e2495cc51f659d505bfec8b72905c19e4094. * Revert "oldtests: set shellslash in Test_true_false_arg()" This reverts commit 8bd194f98aaf8d79886b78f4bd29f9525c1459c8. * Remove unnecessary set shellslash Since #10679 no longer requires individual set shellslash, it is removed. Co-Authored-By: erw7 <erw7.github@gmail.com>
-rw-r--r--src/nvim/testdir/test_cd.vim3
-rw-r--r--src/nvim/testdir/test_checkpath.vim9
-rw-r--r--src/nvim/testdir/test_find_complete.vim3
-rw-r--r--src/nvim/testdir/test_functions.vim8
-rw-r--r--src/nvim/testdir/test_options.vim3
-rw-r--r--src/nvim/testdir/test_quickfix.vim3
-rw-r--r--src/nvim/testdir/test_statusline.vim3
-rw-r--r--src/nvim/testdir/test_true_false.vim9
8 files changed, 4 insertions, 37 deletions
diff --git a/src/nvim/testdir/test_cd.vim b/src/nvim/testdir/test_cd.vim
index 4436ebbf31..770ed55b8d 100644
--- a/src/nvim/testdir/test_cd.vim
+++ b/src/nvim/testdir/test_cd.vim
@@ -24,10 +24,7 @@ func Test_cd_no_arg()
call assert_equal(path, getcwd())
else
" Test that cd without argument echoes cwd on non-Unix systems.
- let shellslash = &shellslash
- set shellslash
call assert_match(getcwd(), execute('cd'))
- let &shellslash = shellslash
endif
endfunc
diff --git a/src/nvim/testdir/test_checkpath.vim b/src/nvim/testdir/test_checkpath.vim
index a7557a107d..eff30cf205 100644
--- a/src/nvim/testdir/test_checkpath.vim
+++ b/src/nvim/testdir/test_checkpath.vim
@@ -2,8 +2,6 @@
" Test for 'include' without \zs or \ze
func Test_checkpath1()
- let save_shellslash = &shellslash
- set shellslash
call mkdir("Xdir1/dir2", "p")
call writefile(['#include "bar.a"'], 'Xdir1/dir2/foo.a')
call writefile(['#include "baz.a"'], 'Xdir1/dir2/bar.a')
@@ -27,7 +25,6 @@ func Test_checkpath1()
call delete("./Xbase.a")
call delete("Xdir1", "rf")
set path&
- let &shellslash = save_shellslash
endfunc
func DotsToSlashes()
@@ -36,8 +33,6 @@ endfunc
" Test for 'include' with \zs and \ze
func Test_checkpath2()
- let save_shellslash = &shellslash
- set shellslash
call mkdir("Xdir1/dir2", "p")
call writefile(['%inc /bar/'], 'Xdir1/dir2/foo.b')
call writefile(['%inc /baz/'], 'Xdir1/dir2/bar.b')
@@ -66,7 +61,6 @@ func Test_checkpath2()
set path&
set include&
set includeexpr&
- let &shellslash = save_shellslash
endfunc
func StripNewlineChar()
@@ -78,8 +72,6 @@ endfunc
" Test for 'include' with \zs and no \ze
func Test_checkpath3()
- let save_shellslash = &shellslash
- set shellslash
call mkdir("Xdir1/dir2", "p")
call writefile(['%inc bar.c'], 'Xdir1/dir2/foo.c')
call writefile(['%inc baz.c'], 'Xdir1/dir2/bar.c')
@@ -109,5 +101,4 @@ func Test_checkpath3()
set path&
set include&
set includeexpr&
- let &shellslash = save_shellslash
endfunc
diff --git a/src/nvim/testdir/test_find_complete.vim b/src/nvim/testdir/test_find_complete.vim
index 7592b16192..a7bc135d47 100644
--- a/src/nvim/testdir/test_find_complete.vim
+++ b/src/nvim/testdir/test_find_complete.vim
@@ -3,8 +3,6 @@
" Do all the tests in a separate window to avoid E211 when we recursively
" delete the Xfind directory during cleanup
func Test_find_complete()
- let shellslash = &shellslash
- set shellslash
set belloff=all
" On windows a stale "Xfind" directory may exist, remove it so that
@@ -162,5 +160,4 @@ func Test_find_complete()
exe 'cd ' . cwd
call delete('Xfind', 'rf')
set path&
- let &shellslash = shellslash
endfunc
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index b03abb5b34..9e07e6e1ec 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -976,8 +976,8 @@ func Test_balloon_show()
endfunc
func Test_shellescape()
- let [save_shell, save_shellslash] = [&shell, &shellslash]
- set shell=bash shellslash
+ let save_shell = &shell
+ set shell=bash
call assert_equal("'text'", shellescape('text'))
call assert_equal("'te\"xt'", shellescape('te"xt'))
call assert_equal("'te'\\''xt'", shellescape("te'xt"))
@@ -991,13 +991,13 @@ func Test_shellescape()
call assert_equal("'te\nxt'", shellescape("te\nxt"))
call assert_equal("'te\\\nxt'", shellescape("te\nxt", 1))
- set shell=tcsh shellslash
+ set shell=tcsh
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, &shellslash] = [save_shell, save_shellslash]
+ let &shell = save_shell
endfunc
func Test_redo_in_nested_functions()
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim
index a6ebd7b023..ffd344200b 100644
--- a/src/nvim/testdir/test_options.vim
+++ b/src/nvim/testdir/test_options.vim
@@ -210,8 +210,6 @@ func Test_set_completion()
call assert_equal('"set fileencodings:ucs-bom,utf-8,default,latin1', @:)
" Expand directories.
- let shellslash = &shellslash
- set shellslash
call feedkeys(":set cdpath=./\<C-A>\<C-B>\"\<CR>", 'tx')
call assert_match('./samples/ ', @:)
call assert_notmatch('./small.vim ', @:)
@@ -223,7 +221,6 @@ func Test_set_completion()
call feedkeys(":set tags=./\\\\ dif\<C-A>\<C-B>\"\<CR>", 'tx')
call assert_equal('"set tags=./\\ diff diffexpr diffopt', @:)
set tags&
- let &shellslash = shellslash
endfunc
func Test_set_errors()
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index ce0b8f1be8..1072c51aa2 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -139,8 +139,6 @@ func XlistTests(cchar)
\ ' 5:50 col 25 55: one'], l)
" Test for module names, one needs to explicitly set `'valid':v:true` so
- let save_shellslash = &shellslash
- set shellslash
call g:Xsetlist([
\ {'lnum':10,'col':5,'type':'W','module':'Data.Text','text':'ModuleWarning','nr':11,'valid':v:true},
\ {'lnum':20,'col':10,'type':'W','module':'Data.Text','filename':'Data/Text.hs','text':'ModuleWarning','nr':22,'valid':v:true},
@@ -149,7 +147,6 @@ func XlistTests(cchar)
call assert_equal([' 1 Data.Text:10 col 5 warning 11: ModuleWarning',
\ ' 2 Data.Text:20 col 10 warning 22: ModuleWarning',
\ ' 3 Data/Text.hs:30 col 15 warning 33: FileWarning'], l)
- let &shellslash = save_shellslash
" Error cases
call assert_fails('Xlist abc', 'E488:')
diff --git a/src/nvim/testdir/test_statusline.vim b/src/nvim/testdir/test_statusline.vim
index ea29da0262..b86340a23a 100644
--- a/src/nvim/testdir/test_statusline.vim
+++ b/src/nvim/testdir/test_statusline.vim
@@ -86,11 +86,8 @@ func Test_statusline()
call assert_match('^Xstatusline\s*$', s:get_statusline())
" %F: Full path to the file in the buffer.
- let shellslash = &shellslash
- set shellslash
set statusline=%F
call assert_match('/testdir/Xstatusline\s*$', s:get_statusline())
- let &shellslash = shellslash
" %h: Help buffer flag, text is "[help]".
" %H: Help buffer flag, text is ",HLP".
diff --git a/src/nvim/testdir/test_true_false.vim b/src/nvim/testdir/test_true_false.vim
index ad865bb113..84aca737ac 100644
--- a/src/nvim/testdir/test_true_false.vim
+++ b/src/nvim/testdir/test_true_false.vim
@@ -57,9 +57,6 @@ endfunc
" Test using TRUE or FALSE values for an argument.
func Test_true_false_arg()
- let shellslash = &shellslash
- let wildignore = &wildignore
- set shellslash
call Try_arg_true_false('count(["a", "A"], "a", %v%)', 1, 2)
set wildignore=*.swp
@@ -113,8 +110,6 @@ func Test_true_false_arg()
let here_id = synID(1, 3, 0)
call Try_arg_true_false('synID(1, 3, %v%)', here_id, brackets_id)
bwipe!
- let &wildignore = wildignore
- let &shellslash = shellslash
endfunc
function Try_arg_non_zero(expr, false_val, true_val)
@@ -134,8 +129,6 @@ func Test_non_zero_arg()
" call test_settime(93784)
" call Try_arg_non_zero("mode(%v%)", 'x', 'x!')
" call test_settime(0)
- let shellslash = &shellslash
- set shellslash
call Try_arg_non_zero("shellescape('foo%', %v%)", "'foo%'", "'foo\\%'")
@@ -154,6 +147,4 @@ func Test_non_zero_arg()
let r = visualmode(v)
call assert_equal('', r, 'result for ' . v . ' is not "" but ' . r)
endfor
-
- let &shellslash = shellslash
endfunc