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.
This commit is contained in:
Jan Edmund Lazo
2018-03-28 01:18:39 -04:00
parent 87f4d2592c
commit 79a8d905ab
2 changed files with 9 additions and 1 deletions

View File

@@ -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

View File

@@ -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