mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 08:51:14 -03:00
make unit tests more hermetic regarding env vars
Specifically, the `TERM` and `ITERM_PROFILE` env vars. If we don't set them to known values the unit tests can fail in unexpected ways. Fixes #3395
This commit is contained in:
@@ -10,6 +10,12 @@ set TESTS_TO_RETRY bind.expect
|
||||
# Change to directory containing this script
|
||||
cd (dirname (status -f))
|
||||
|
||||
# These env vars should not be inherited from the user environment because they can affect the
|
||||
# behavior of the tests. So either remove them or set them to a known value.
|
||||
# See also tests/test.fish.
|
||||
set TERM xterm
|
||||
set -e ITERM_PROFILE
|
||||
|
||||
# Test files specified on commandline, or all *.expect files
|
||||
if set -q argv[1]
|
||||
set files_to_test $argv.expect
|
||||
|
||||
Reference in New Issue
Block a user