From 79a8d905ab8908362109284240d2f9a75564f8ad Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 28 Mar 2018 01:18:39 -0400 Subject: 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. --- src/nvim/testdir/setup.vim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nvim/testdir/setup.vim') 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 -- cgit