@@ -67,10 +67,10 @@ compare_posix_output() { |
| 67 | 67 | test_name="$1" |
| 68 | 68 | test_cmd="$2" |
| 69 | 69 | |
| 70 | | - posix_output=$(FORTSH_RC_FILE=/dev/null "$BASH_REF" -c "$test_cmd" 2>&1 | normalize_output) |
| 70 | + posix_output=$(env $RC_DISABLE_ENV "$BASH_REF" -c "$test_cmd" 2>&1 | normalize_output) |
| 71 | 71 | posix_exit=$? |
| 72 | 72 | |
| 73 | | - shell_output=$(FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c "$test_cmd" 2>&1 | normalize_output) |
| 73 | + shell_output=$(env $RC_DISABLE_ENV "$SHELL_BIN" -c "$test_cmd" 2>&1 | normalize_output) |
| 74 | 74 | shell_exit=$? |
| 75 | 75 | |
| 76 | 76 | if [ "$posix_output" = "$shell_output" ] && [ "$posix_exit" = "$shell_exit" ]; then |
@@ -91,10 +91,10 @@ compare_posix_error() { |
| 91 | 91 | test_name="$1" |
| 92 | 92 | test_cmd="$2" |
| 93 | 93 | |
| 94 | | - posix_output=$(FORTSH_RC_FILE=/dev/null "$BASH_REF" -c "$test_cmd" 2>&1) |
| 94 | + posix_output=$(env $RC_DISABLE_ENV "$BASH_REF" -c "$test_cmd" 2>&1) |
| 95 | 95 | posix_exit=$? |
| 96 | 96 | |
| 97 | | - shell_output=$(FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c "$test_cmd" 2>&1) |
| 97 | + shell_output=$(env $RC_DISABLE_ENV "$SHELL_BIN" -c "$test_cmd" 2>&1) |
| 98 | 98 | shell_exit=$? |
| 99 | 99 | |
| 100 | 100 | posix_norm=$(normalize_error "$posix_output") |
@@ -112,7 +112,7 @@ test_accepts() { |
| 112 | 112 | test_name="$1" |
| 113 | 113 | test_cmd="$2" |
| 114 | 114 | |
| 115 | | - if FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c "$test_cmd" >/dev/null 2>&1; then |
| 115 | + if env $RC_DISABLE_ENV "$SHELL_BIN" -c "$test_cmd" >/dev/null 2>&1; then |
| 116 | 116 | pass "$test_name" |
| 117 | 117 | else |
| 118 | 118 | fail "$test_name" "should succeed" "failed or not implemented" |
@@ -124,7 +124,7 @@ test_fails() { |
| 124 | 124 | test_name="$1" |
| 125 | 125 | test_cmd="$2" |
| 126 | 126 | |
| 127 | | - if ! FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c "$test_cmd" >/dev/null 2>&1; then |
| 127 | + if ! env $RC_DISABLE_ENV "$SHELL_BIN" -c "$test_cmd" >/dev/null 2>&1; then |
| 128 | 128 | pass "$test_name" |
| 129 | 129 | else |
| 130 | 130 | fail "$test_name" "should fail" "succeeded unexpectedly" |
@@ -229,7 +229,7 @@ test_trap_behavior() { |
| 229 | 229 | test_cmd="$2" |
| 230 | 230 | expected_pattern="$3" |
| 231 | 231 | |
| 232 | | - output=$(FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c "$test_cmd" 2>&1) |
| 232 | + output=$(env $RC_DISABLE_ENV "$SHELL_BIN" -c "$test_cmd" 2>&1) |
| 233 | 233 | |
| 234 | 234 | if echo "$output" | grep -qE "$expected_pattern"; then |
| 235 | 235 | pass "$test_name" |
@@ -335,8 +335,8 @@ section "271. PIPELINE - LONG CHAINS" |
| 335 | 335 | compare_posix_output "5-stage pipeline" 'echo test | cat | cat | cat | cat | cat' |
| 336 | 336 | # Pipeline timing can produce non-deterministic pipe errors — filter them out |
| 337 | 337 | TEST_NUM=$((TEST_NUM + 1)) |
| 338 | | -_pf_expected=$(FORTSH_RC_FILE=/dev/null "$BASH_REF" -c 'echo ok | false | cat; echo $?' 2>&1 | grep -v 'Broken pipe' | normalize_output) |
| 339 | | -_pf_actual=$(FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c 'echo ok | false | cat; echo $?' 2>&1 | grep -v 'Broken pipe' | normalize_output) |
| 338 | +_pf_expected=$(env $RC_DISABLE_ENV "$BASH_REF" -c 'echo ok | false | cat; echo $?' 2>&1 | grep -v 'Broken pipe' | normalize_output) |
| 339 | +_pf_actual=$(env $RC_DISABLE_ENV "$SHELL_BIN" -c 'echo ok | false | cat; echo $?' 2>&1 | grep -v 'Broken pipe' | normalize_output) |
| 340 | 340 | if [ "$_pf_expected" = "$_pf_actual" ]; then pass "pipeline with failures" |
| 341 | 341 | else fail "pipeline with failures" "$_pf_expected" "$_pf_actual"; fi |
| 342 | 342 | |
@@ -359,7 +359,7 @@ test_alias_behavior() { |
| 359 | 359 | test_cmd="$2" |
| 360 | 360 | expected_pattern="$3" |
| 361 | 361 | |
| 362 | | - output=$(FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c "$test_cmd" 2>&1) |
| 362 | + output=$(env $RC_DISABLE_ENV "$SHELL_BIN" -c "$test_cmd" 2>&1) |
| 363 | 363 | |
| 364 | 364 | if echo "$output" | grep -qiE "$expected_pattern"; then |
| 365 | 365 | pass "$test_name" |