aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-03-28 01:18:39 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-04-12 02:18:18 -0400
commit79a8d905ab8908362109284240d2f9a75564f8ad (patch)
treefb57b64670622ce797fda7316a9f1453c1a94867
parent87f4d2592c2ba164683b1f0f813cf9f029a0abfb (diff)
downloadrneovim-79a8d905ab8908362109284240d2f9a75564f8ad.tar.gz
rneovim-79a8d905ab8908362109284240d2f9a75564f8ad.tar.bz2
rneovim-79a8d905ab8908362109284240d2f9a75564f8ad.zip
oldtests: newstyle: win: reset shell to cmd.exe
Unset $SHELL so that child nvim use cmd.exe as default shell. Unset $TERM so that child nvim don't segfault with negative exit code. sh/bash use TERM=cygwin by default if it is unset. mintty sets TERM to xterm.
-rw-r--r--src/nvim/testdir/runtest.vim2
-rw-r--r--src/nvim/testdir/setup.vim8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim
index 7090be7726..5c98455909 100644
--- a/src/nvim/testdir/runtest.vim
+++ b/src/nvim/testdir/runtest.vim
@@ -61,7 +61,7 @@ set nomore
lang mess C
" Always use forward slashes.
-set shellslash
+" set shellslash
" Prepare for calling test_garbagecollect_now().
let v:testing = 1
diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim
index 7d6dd0c7ce..aac9fefef4 100644
--- a/src/nvim/testdir/setup.vim
+++ b/src/nvim/testdir/setup.vim
@@ -17,3 +17,11 @@ let &packpath = &rtp
" Make sure $HOME does not get read or written.
let $HOME = '/does/not/exist'
+
+" Use default shell on Windows to avoid segfault, caused by TUI
+if has('win32')
+ let $SHELL = ''
+ let $TERM = ''
+ let &shell = empty($COMSPEC) ? exepath('cmd.exe') : $COMSPEC
+ set shellcmdflag=/s/c shellxquote=\" shellredir=>%s\ 2>&1
+endif