Skip to content
Myr

fix: unset environment variables before shtests (#3283)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Tests no longer fail if `JQ_COLORS` and `NO_COLOR` are already set.

authored by SArpnt · committed by GitHub · parent a09a4df · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • tests:+3 added−2 removed

1 file+3 added−2 removed

modified:tests/shtest+3 added-2 removed
15 unmodified lines
1617SHELL=/bin/sh18export SHELL1920unset JQ_COLORS21unset NO_COLOR2223if [ -f "$JQBASEDIR/.libs/libinject_errors.so" ]; then24 # Do some simple error injection tests to check that we're handling25 # I/O errors correctly.26 (
394 unmodified lines
421 exit 1422fi423424# Check $JQ_COLORS422unset JQ_COLORS425426## Default colors, null input427$JQ -Ccn . > $d/color428printf '\033[0;90mnull\033[0m\n' > $d/expect
130 unmodified lines
559test_no_color=true560$msys && test_no_color=false561$mingw && test_no_color=false562if $test_no_color && command -v script >/dev/null 2>&1; then561 unset NO_COLOR563 if script -qc echo /dev/null >/dev/null 2>&1; then564 faketty() { script -qec "$*" /dev/null; }565 else # macOS566 faketty() { script -q /dev/null "$@" /dev/null |
181 unmodified lines