tenseleyflow/bensch / 73a6465

Browse files

generalize error normalization and rename fortsh references

- normalize_shell_name() now catches any *sh: prefix, not just bash/fortsh
- Debug output labels: 'fortsh:' -> 'shell:'
- Variable names: fortsh_file -> shell_file, fortsh_code -> shell_code, etc.
- Temp file paths: /tmp/fortsh_* -> /tmp/bensch_*
- Comments and descriptions: 'for fortsh' -> generic
Authored by espadonne
SHA
73a64656905843e9a409b02a9f914f5d8b8297f6
Parents
5356b21
Tree
be1810a

30 changed files

StatusFile+-
M suites/builtins/integration/run_integration_tests.sh 1 1
M suites/builtins/portable/test_stress.sh 6 6
M suites/builtins/run_builtin_tests.sh 1 1
M suites/posix/posix_compliance_advanced.sh 13 13
M suites/posix/posix_compliance_builtins.sh 35 35
M suites/posix/posix_compliance_charclass.sh 3 3
M suites/posix/posix_compliance_control.sh 6 6
M suites/posix/posix_compliance_coverage.sh 11 11
M suites/posix/posix_compliance_extended.sh 12 12
M suites/posix/posix_compliance_filetest.sh 3 3
M suites/posix/posix_compliance_gaps.sh 21 21
M suites/posix/posix_compliance_heredoc.sh 3 3
M suites/posix/posix_compliance_jobcontrol.sh 1 1
M suites/posix/posix_compliance_options.sh 6 6
M suites/posix/posix_compliance_printf.sh 2 2
M suites/posix/posix_compliance_quoting.sh 2 2
M suites/posix/posix_compliance_redirect.sh 3 3
M suites/posix/posix_compliance_special.sh 1 1
M suites/posix/posix_compliance_test.sh 12 12
M suites/posix/posix_compliance_untested.sh 12 12
M suites/posix/posix_gaps_arithmetic.sh 9 9
M suites/posix/posix_gaps_builtins.sh 12 12
M suites/posix/posix_gaps_charclass.sh 6 6
M suites/posix/posix_gaps_control.sh 11 11
M suites/posix/posix_gaps_heredoc.sh 9 9
M suites/posix/posix_gaps_quoting.sh 6 6
M suites/posix/posix_gaps_redirect.sh 9 9
M suites/posix/posix_gaps_special.sh 7 7
M suites/posix/run_posix_tests.sh 1 1
M suites/test_harness.sh 5 5
suites/builtins/integration/run_integration_tests.shmodified
@@ -13,7 +13,7 @@ elif command -v gtimeout >/dev/null 2>&1; then
1313
 else
1414
     run_with_timeout() {
1515
         _rwt_secs="$1"; shift
16
-        _rwt_tmp=$(mktemp /tmp/fortsh_timeout.XXXXXX)
16
+        _rwt_tmp=$(mktemp /tmp/bensch_timeout.XXXXXX)
1717
         ( "$@" ) > "$_rwt_tmp" 2>&1 &
1818
         _rwt_pid=$!
1919
         ( sleep "$_rwt_secs"; kill "$_rwt_pid" 2>/dev/null ) &
suites/builtins/portable/test_stress.shmodified
@@ -529,10 +529,10 @@ compare_output "many semicolons 30 commands" \
529529
 section "22 - FD and redirection stress"
530530
 
531531
 compare_output "rapid redirect cycling 100 iterations" \
532
-  'i=1; while [ $i -le 100 ]; do echo $i > /tmp/fortsh_test_fd_$$; i=$((i+1)); done; cat /tmp/fortsh_test_fd_$$; rm -f /tmp/fortsh_test_fd_$$'
532
+  'i=1; while [ $i -le 100 ]; do echo $i > /tmp/bensch_test_fd_$$; i=$((i+1)); done; cat /tmp/bensch_test_fd_$$; rm -f /tmp/bensch_test_fd_$$'
533533
 
534534
 compare_output "append redirect 200 lines" \
535
-  'rm -f /tmp/fortsh_test_append_$$; i=1; while [ $i -le 200 ]; do echo $i >> /tmp/fortsh_test_append_$$; i=$((i+1)); done; wc -l < /tmp/fortsh_test_append_$$; rm -f /tmp/fortsh_test_append_$$'
535
+  'rm -f /tmp/bensch_test_append_$$; i=1; while [ $i -le 200 ]; do echo $i >> /tmp/bensch_test_append_$$; i=$((i+1)); done; wc -l < /tmp/bensch_test_append_$$; rm -f /tmp/bensch_test_append_$$'
536536
 
537537
 compare_output "stderr redirect in loop" \
538538
   'for i in 1 2 3 4 5; do echo "err$i" >&2; done 2>&1 | wc -l'
@@ -731,7 +731,7 @@ C'
731731
 section "29 - Glob expansion"
732732
 
733733
 compare_output "glob with many matches" \
734
-  'mkdir -p /tmp/fortsh_glob_$$; i=1; while [ $i -le 200 ]; do touch /tmp/fortsh_glob_$$/f$i.txt; i=$((i+1)); done; ls /tmp/fortsh_glob_$$/*.txt | wc -l; rm -rf /tmp/fortsh_glob_$$'
734
+  'mkdir -p /tmp/bensch_glob_$$; i=1; while [ $i -le 200 ]; do touch /tmp/bensch_glob_$$/f$i.txt; i=$((i+1)); done; ls /tmp/bensch_glob_$$/*.txt | wc -l; rm -rf /tmp/bensch_glob_$$'
735735
 
736736
 # Use check_output for glob no-match since $$ differs between bash and fortsh
737737
 check_output "glob with no matches nullglob off" \
@@ -739,10 +739,10 @@ check_output "glob with no matches nullglob off" \
739739
   '/tmp/no_such_dir_xyz/*.abc'
740740
 
741741
 compare_output "glob bracket expression" \
742
-  'mkdir -p /tmp/fortsh_glob2_$$; touch /tmp/fortsh_glob2_$$/a1 /tmp/fortsh_glob2_$$/b2 /tmp/fortsh_glob2_$$/c3; ls /tmp/fortsh_glob2_$$/[abc][0-9] | wc -l; rm -rf /tmp/fortsh_glob2_$$'
742
+  'mkdir -p /tmp/bensch_glob2_$$; touch /tmp/bensch_glob2_$$/a1 /tmp/bensch_glob2_$$/b2 /tmp/bensch_glob2_$$/c3; ls /tmp/bensch_glob2_$$/[abc][0-9] | wc -l; rm -rf /tmp/bensch_glob2_$$'
743743
 
744744
 compare_output "glob question mark" \
745
-  'mkdir -p /tmp/fortsh_glob3_$$; touch /tmp/fortsh_glob3_$$/ax /tmp/fortsh_glob3_$$/bx /tmp/fortsh_glob3_$$/cx; echo /tmp/fortsh_glob3_$$/?x | wc -w; rm -rf /tmp/fortsh_glob3_$$'
745
+  'mkdir -p /tmp/bensch_glob3_$$; touch /tmp/bensch_glob3_$$/ax /tmp/bensch_glob3_$$/bx /tmp/bensch_glob3_$$/cx; echo /tmp/bensch_glob3_$$/?x | wc -w; rm -rf /tmp/bensch_glob3_$$'
746746
 
747747
 # ==========================================
748748
 # 30. Eval & dynamic execution stress
@@ -843,7 +843,7 @@ compare_output "brace group pipeline" \
843843
   '{ echo hello; echo world; } | sort'
844844
 
845845
 compare_output "brace group with redirect" \
846
-  '{ echo line1; echo line2; echo line3; } > /tmp/fortsh_brace_$$; wc -l < /tmp/fortsh_brace_$$; rm -f /tmp/fortsh_brace_$$'
846
+  '{ echo line1; echo line2; echo line3; } > /tmp/bensch_brace_$$; wc -l < /tmp/bensch_brace_$$; rm -f /tmp/bensch_brace_$$'
847847
 
848848
 compare_output "nested brace groups" \
849849
   '{ { { echo deep; }; }; }'
suites/builtins/run_builtin_tests.shmodified
@@ -14,7 +14,7 @@ else
1414
     # POSIX fallback using temp file for output capture compatibility
1515
     run_with_timeout() {
1616
         _rwt_secs="$1"; shift
17
-        _rwt_tmp=$(mktemp /tmp/fortsh_timeout.XXXXXX)
17
+        _rwt_tmp=$(mktemp /tmp/bensch_timeout.XXXXXX)
1818
         ( "$@" ) > "$_rwt_tmp" 2>&1 &
1919
         _rwt_pid=$!
2020
         ( sleep "$_rwt_secs"; kill "$_rwt_pid" 2>/dev/null ) &
suites/posix/posix_compliance_advanced.shmodified
@@ -1,6 +1,6 @@
11
 #!/bin/sh
22
 # =====================================
3
-# POSIX Compliance Advanced Test Suite for fortsh
3
+# POSIX Compliance Advanced Test Suite for shell
44
 # =====================================
55
 # Additional coverage based on OpenGroup POSIX.1-2017 specification
66
 # Fills gaps not covered in basic, extended, and builtins test suites
@@ -38,7 +38,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
3838
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
3939
 BASH_REF="${BASH_REF:-bash}"
4040
 
41
-# Check if fortsh exists
41
+# Check if shell binary exists
4242
 if [ ! -x "$SHELL_BIN" ]; then
4343
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
4444
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -61,7 +61,7 @@ fail() {
6161
         printf "  posix:  %s\n" "$2"
6262
     fi
6363
     if [ -n "$3" ]; then
64
-        printf "  fortsh: %s\n" "$3"
64
+        printf "  shell: %s\n" "$3"
6565
     fi
6666
     FAILED=$((FAILED + 1))
6767
 }
@@ -84,7 +84,7 @@ section() {
8484
 
8585
 # Normalize shell error messages by stripping shell name and "line N: " prefix
8686
 normalize_output() {
87
-    sed -e 's|^[^ ]*bash: |sh: |' -e 's|^[^ ]*fortsh: |sh: |' -e 's/line [0-9]*: //'
87
+    sed -e 's|^[^ ]*/[a-z]*sh[0-9]*: |sh: |' -e 's|^[a-z]*sh[0-9]*: |sh: |' -e 's/line [0-9]*: //'
8888
 }
8989
 
9090
 # Helper function to run command in both shells and compare
@@ -92,22 +92,22 @@ compare_posix_output() {
9292
     test_name="$1"
9393
     command="$2"
9494
     posix_file="/tmp/posix_adv_$$_posix"
95
-    fortsh_file="/tmp/posix_adv_$$_fortsh"
95
+    shell_file="/tmp/posix_adv_$$_shell"
9696
 
9797
     # Run in POSIX shell (sh)
9898
     "$BASH_REF" -c "$command" 2>&1 | normalize_output > "$posix_file" || true
9999
 
100
-    # Run in fortsh
101
-    "$SHELL_BIN" -c "$command" 2>&1 | normalize_output > "$fortsh_file" || true
100
+    # Run in shell under test
101
+    "$SHELL_BIN" -c "$command" 2>&1 | normalize_output > "$shell_file" || true
102102
 
103103
     # Compare outputs
104
-    if diff -q "$posix_file" "$fortsh_file" > /dev/null 2>&1; then
104
+    if diff -q "$posix_file" "$shell_file" > /dev/null 2>&1; then
105105
         pass "$test_name"
106106
     else
107
-        fail "$test_name" "$(cat "$posix_file")" "$(cat "$fortsh_file")"
107
+        fail "$test_name" "$(cat "$posix_file")" "$(cat "$shell_file")"
108108
     fi
109109
 
110
-    rm -f "$posix_file" "$fortsh_file"
110
+    rm -f "$posix_file" "$shell_file"
111111
 }
112112
 
113113
 # Helper function to compare exit codes
@@ -119,12 +119,12 @@ compare_posix_exit_code() {
119119
     posix_exit=$?
120120
 
121121
     "$SHELL_BIN" -c "$command" > /dev/null 2>&1
122
-    fortsh_exit=$?
122
+    shell_exit=$?
123123
 
124
-    if [ "$posix_exit" -eq "$fortsh_exit" ]; then
124
+    if [ "$posix_exit" -eq "$shell_exit" ]; then
125125
         pass "$test_name"
126126
     else
127
-        fail "$test_name" "exit=$posix_exit" "exit=$fortsh_exit"
127
+        fail "$test_name" "exit=$posix_exit" "exit=$shell_exit"
128128
     fi
129129
 }
130130
 
suites/posix/posix_compliance_builtins.shmodified
@@ -219,11 +219,11 @@ test_p1_exit_code_126() {
219219
     section "P1-1: Exit Code 126 (Non-executable File)"
220220
 
221221
     # Test 1: Non-executable file returns 126
222
-    touch /tmp/fortsh_test_nonexec
223
-    chmod 644 /tmp/fortsh_test_nonexec
224
-    $SHELL_BIN -c '/tmp/fortsh_test_nonexec' >/dev/null 2>&1
222
+    touch /tmp/bensch_test_nonexec
223
+    chmod 644 /tmp/bensch_test_nonexec
224
+    $SHELL_BIN -c '/tmp/bensch_test_nonexec' >/dev/null 2>&1
225225
     exit_code=$?
226
-    rm -f /tmp/fortsh_test_nonexec
226
+    rm -f /tmp/bensch_test_nonexec
227227
 
228228
     if [ $exit_code -eq 126 ]; then
229229
         pass "P1-1.1: Non-executable file returns exit code 126"
@@ -240,12 +240,12 @@ test_p1_exit_code_126() {
240240
     fi
241241
 
242242
     # Test 3: Executable file returns its own exit code
243
-    echo '#!/bin/sh' > /tmp/fortsh_test_exec
244
-    echo 'exit 5' >> /tmp/fortsh_test_exec
245
-    chmod 755 /tmp/fortsh_test_exec
246
-    $SHELL_BIN -c '/tmp/fortsh_test_exec' >/dev/null 2>&1
243
+    echo '#!/bin/sh' > /tmp/bensch_test_exec
244
+    echo 'exit 5' >> /tmp/bensch_test_exec
245
+    chmod 755 /tmp/bensch_test_exec
246
+    $SHELL_BIN -c '/tmp/bensch_test_exec' >/dev/null 2>&1
247247
     exit_code=$?
248
-    rm -f /tmp/fortsh_test_exec
248
+    rm -f /tmp/bensch_test_exec
249249
 
250250
     if [ $exit_code -eq 5 ]; then
251251
         pass "P1-1.3: Executable file returns its own exit code"
@@ -258,11 +258,11 @@ test_p1_set_c_noclobber() {
258258
     section "P1-2: set -C (noclobber option)"
259259
 
260260
     # Test 1: set -C prevents overwriting existing files
261
-    echo "original" > /tmp/fortsh_test_noclobber
262
-    $SHELL_BIN -c 'set -C; echo new > /tmp/fortsh_test_noclobber' >/dev/null 2>&1
261
+    echo "original" > /tmp/bensch_test_noclobber
262
+    $SHELL_BIN -c 'set -C; echo new > /tmp/bensch_test_noclobber' >/dev/null 2>&1
263263
     exit_code=$?
264
-    content=$(cat /tmp/fortsh_test_noclobber 2>/dev/null)
265
-    rm -f /tmp/fortsh_test_noclobber
264
+    content=$(cat /tmp/bensch_test_noclobber 2>/dev/null)
265
+    rm -f /tmp/bensch_test_noclobber
266266
 
267267
     if [ $exit_code -ne 0 ] && [ "$content" = "original" ]; then
268268
         pass "P1-2.1: set -C prevents overwriting existing files"
@@ -271,20 +271,20 @@ test_p1_set_c_noclobber() {
271271
     fi
272272
 
273273
     # Test 2: set -C allows writing to new files
274
-    rm -f /tmp/fortsh_test_noclobber_new
275
-    $SHELL_BIN -c 'set -C; echo content > /tmp/fortsh_test_noclobber_new' >/dev/null 2>&1
276
-    if [ -f /tmp/fortsh_test_noclobber_new ]; then
274
+    rm -f /tmp/bensch_test_noclobber_new
275
+    $SHELL_BIN -c 'set -C; echo content > /tmp/bensch_test_noclobber_new' >/dev/null 2>&1
276
+    if [ -f /tmp/bensch_test_noclobber_new ]; then
277277
         pass "P1-2.2: set -C allows writing to non-existent files"
278
-        rm -f /tmp/fortsh_test_noclobber_new
278
+        rm -f /tmp/bensch_test_noclobber_new
279279
     else
280280
         fail "P1-2.2: set -C allows writing to non-existent files"
281281
     fi
282282
 
283283
     # Test 3: >| forces overwrite even with noclobber
284
-    echo "original" > /tmp/fortsh_test_force
285
-    $SHELL_BIN -c 'set -C; echo forced >| /tmp/fortsh_test_force' >/dev/null 2>&1
286
-    content=$(cat /tmp/fortsh_test_force 2>/dev/null)
287
-    rm -f /tmp/fortsh_test_force
284
+    echo "original" > /tmp/bensch_test_force
285
+    $SHELL_BIN -c 'set -C; echo forced >| /tmp/bensch_test_force' >/dev/null 2>&1
286
+    content=$(cat /tmp/bensch_test_force 2>/dev/null)
287
+    rm -f /tmp/bensch_test_force
288288
 
289289
     if [ "$content" = "forced" ]; then
290290
         pass "P1-2.3: >| forces overwrite with noclobber set"
@@ -293,10 +293,10 @@ test_p1_set_c_noclobber() {
293293
     fi
294294
 
295295
     # Test 4: set +C disables noclobber
296
-    echo "original" > /tmp/fortsh_test_disable
297
-    $SHELL_BIN -c 'set -C; set +C; echo new > /tmp/fortsh_test_disable' >/dev/null 2>&1
298
-    content=$(cat /tmp/fortsh_test_disable 2>/dev/null)
299
-    rm -f /tmp/fortsh_test_disable
296
+    echo "original" > /tmp/bensch_test_disable
297
+    $SHELL_BIN -c 'set -C; set +C; echo new > /tmp/bensch_test_disable' >/dev/null 2>&1
298
+    content=$(cat /tmp/bensch_test_disable 2>/dev/null)
299
+    rm -f /tmp/bensch_test_disable
300300
 
301301
     if [ "$content" = "new" ]; then
302302
         pass "P1-2.4: set +C disables noclobber option"
@@ -422,9 +422,9 @@ test_p2_dot_with_args() {
422422
     section "P2-2: dot (.) Source with Arguments"
423423
 
424424
     # Test 1: Source script with positional parameters
425
-    echo 'echo "arg1=$1 arg2=$2"' > /tmp/fortsh_test_source
426
-    output=$($SHELL_BIN -c '. /tmp/fortsh_test_source hello world' 2>&1)
427
-    rm -f /tmp/fortsh_test_source
425
+    echo 'echo "arg1=$1 arg2=$2"' > /tmp/bensch_test_source
426
+    output=$($SHELL_BIN -c '. /tmp/bensch_test_source hello world' 2>&1)
427
+    rm -f /tmp/bensch_test_source
428428
 
429429
     if echo "$output" | grep -q "arg1=hello arg2=world"; then
430430
         pass "P2-2.1: dot command passes arguments to sourced script"
@@ -433,9 +433,9 @@ test_p2_dot_with_args() {
433433
     fi
434434
 
435435
     # Test 2: Source script preserves caller's variables
436
-    echo 'SOURCED_VAR=from_script' > /tmp/fortsh_test_source2
437
-    output=$($SHELL_BIN -c '. /tmp/fortsh_test_source2; echo $SOURCED_VAR' 2>&1)
438
-    rm -f /tmp/fortsh_test_source2
436
+    echo 'SOURCED_VAR=from_script' > /tmp/bensch_test_source2
437
+    output=$($SHELL_BIN -c '. /tmp/bensch_test_source2; echo $SOURCED_VAR' 2>&1)
438
+    rm -f /tmp/bensch_test_source2
439439
 
440440
     if echo "$output" | grep -q "from_script"; then
441441
         pass "P2-2.2: Sourced script sets variables in caller"
@@ -444,9 +444,9 @@ test_p2_dot_with_args() {
444444
     fi
445445
 
446446
     # Test 3: Source with absolute path
447
-    echo 'echo sourced' > /tmp/fortsh_abs_source
448
-    output=$($SHELL_BIN -c '. /tmp/fortsh_abs_source' 2>&1)
449
-    rm -f /tmp/fortsh_abs_source
447
+    echo 'echo sourced' > /tmp/bensch_abs_source
448
+    output=$($SHELL_BIN -c '. /tmp/bensch_abs_source' 2>&1)
449
+    rm -f /tmp/bensch_abs_source
450450
 
451451
     if echo "$output" | grep -q "sourced"; then
452452
         pass "P2-2.3: dot command works with absolute paths"
@@ -596,7 +596,7 @@ main() {
596596
     echo "Date: $(date)"
597597
     echo ""
598598
 
599
-    # Verify fortsh exists
599
+    # Verify shell binary exists
600600
     if [ ! -x "$SHELL_BIN" ]; then
601601
         echo -e "${RED}ERROR: shell binary not found or not executable: $SHELL_BIN${NC}"
602602
         echo "Please build fortsh or set SHELL_BIN environment variable"
suites/posix/posix_compliance_charclass.shmodified
@@ -1,6 +1,6 @@
11
 #!/bin/sh
22
 # =====================================
3
-# POSIX Compliance Character Class Test Suite for fortsh
3
+# POSIX Compliance Character Class Test Suite for shell
44
 # =====================================
55
 # Tests POSIX bracket expression character classes per IEEE Std 1003.1-2017
66
 # Section 9.3.5 RE Bracket Expression
@@ -26,7 +26,7 @@ FAILED_TESTS_LIST=""
2626
 SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 
29
-# Check if fortsh exists
29
+# Check if shell binary exists
3030
 if [ ! -x "$SHELL_BIN" ]; then
3131
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3232
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -71,7 +71,7 @@ section() {
7171
 
7272
 # Create test directory with test files
7373
 setup_test_files() {
74
-    TEST_DIR="/tmp/fortsh_charclass_$$"
74
+    TEST_DIR="/tmp/bensch_charclass_$$"
7575
     mkdir -p "$TEST_DIR"
7676
     cd "$TEST_DIR" || exit 1
7777
 
suites/posix/posix_compliance_control.shmodified
@@ -1,6 +1,6 @@
11
 #!/bin/sh
22
 # =====================================
3
-# POSIX Compliance Control Flow and Grouping Test Suite for fortsh
3
+# POSIX Compliance Control Flow and Grouping Test Suite for shell
44
 # =====================================
55
 # Tests control flow, subshells, brace groups per IEEE Std 1003.1-2017
66
 # Section: Shell Command Language - Compound Commands
@@ -27,7 +27,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 BASH_REF="${BASH_REF:-bash}"
2929
 
30
-# Check if fortsh exists
30
+# Check if shell binary exists
3131
 if [ ! -x "$SHELL_BIN" ]; then
3232
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3333
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -389,7 +389,7 @@ fi
389389
 section "420. DOT (SOURCE) COMMAND"
390390
 # =====================================
391391
 
392
-TEST_DIR="/tmp/fortsh_control_$$"
392
+TEST_DIR="/tmp/bensch_control_$$"
393393
 mkdir -p "$TEST_DIR"
394394
 
395395
 # Create a file to source
@@ -1143,13 +1143,13 @@ fi
11431143
 # Note: (( )) is arithmetic syntax in bash, not nested subshell
11441144
 # Both bash and fortsh correctly treat this as arithmetic and error
11451145
 "$SHELL_BIN" -c '((echo deep))' >/dev/null 2>&1
1146
-fortsh_exit=$?
1146
+shell_exit=$?
11471147
 "$BASH_REF" -c '((echo deep))' >/dev/null 2>&1
11481148
 bash_exit=$?
1149
-if [ "$fortsh_exit" -eq "$bash_exit" ]; then
1149
+if [ "$shell_exit" -eq "$bash_exit" ]; then
11501150
     pass "double paren arithmetic exit"
11511151
 else
1152
-    fail "double paren arithmetic exit" "exit=$bash_exit" "exit=$fortsh_exit"
1152
+    fail "double paren arithmetic exit" "exit=$bash_exit" "exit=$shell_exit"
11531153
 fi
11541154
 
11551155
 # =====================================
suites/posix/posix_compliance_coverage.shmodified
@@ -59,7 +59,7 @@ section() {
5959
 
6060
 # Normalize output by stripping shell name prefix
6161
 normalize_output() {
62
-    sed -e 's|^[^ ]*bash: |sh: |' -e 's|^[^ ]*fortsh: |sh: |' -e 's/line [0-9]*: //'
62
+    sed -e 's|^[^ ]*/[a-z]*sh[0-9]*: |sh: |' -e 's|^[a-z]*sh[0-9]*: |sh: |' -e 's/line [0-9]*: //'
6363
 }
6464
 
6565
 # Compare output between sh and fortsh
@@ -70,20 +70,20 @@ compare_posix_output() {
7070
     posix_output=$(FORTSH_RC_FILE=/dev/null "$BASH_REF" -c "$test_cmd" 2>&1 | normalize_output)
7171
     posix_exit=$?
7272
 
73
-    fortsh_output=$(FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c "$test_cmd" 2>&1 | normalize_output)
74
-    fortsh_exit=$?
73
+    shell_output=$(FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c "$test_cmd" 2>&1 | normalize_output)
74
+    shell_exit=$?
7575
 
76
-    if [ "$posix_output" = "$fortsh_output" ] && [ "$posix_exit" = "$fortsh_exit" ]; then
76
+    if [ "$posix_output" = "$shell_output" ] && [ "$posix_exit" = "$shell_exit" ]; then
7777
         pass "$test_name"
7878
     else
79
-        fail "$test_name" "$posix_output" "$fortsh_output"
79
+        fail "$test_name" "$posix_output" "$shell_output"
8080
     fi
8181
 }
8282
 
8383
 # Normalize shell error messages by stripping shell name and "line N: " prefix
8484
 # POSIX doesn't mandate error message format, so we normalize for comparison
8585
 normalize_error() {
86
-    echo "$1" | sed -e 's|^[^ ]*bash: |sh: |g' -e 's|[^ ]*bash: |sh: |g' -e 's|^[^ ]*fortsh: |sh: |g' -e 's|[^ ]*fortsh: |sh: |g' -e 's/line [0-9]*: //g' -e 's/-c: //g'
86
+    echo "$1" | sed -e 's|^[^ ]*bash: |sh: |g' -e 's|[^ ]*bash: |sh: |g' -e 's|^[a-z]*sh[0-9]*: |sh: |g' -e 's|[a-z]*sh[0-9]*: |sh: |g' -e 's/line [0-9]*: //g' -e 's/-c: //g'
8787
 }
8888
 
8989
 # Compare error output, normalizing line number differences
@@ -94,16 +94,16 @@ compare_posix_error() {
9494
     posix_output=$(FORTSH_RC_FILE=/dev/null "$BASH_REF" -c "$test_cmd" 2>&1)
9595
     posix_exit=$?
9696
 
97
-    fortsh_output=$(FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c "$test_cmd" 2>&1)
98
-    fortsh_exit=$?
97
+    shell_output=$(FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c "$test_cmd" 2>&1)
98
+    shell_exit=$?
9999
 
100100
     posix_norm=$(normalize_error "$posix_output")
101
-    fortsh_norm=$(normalize_error "$fortsh_output")
101
+    shell_norm=$(normalize_error "$shell_output")
102102
 
103
-    if [ "$posix_norm" = "$fortsh_norm" ] && [ "$posix_exit" = "$fortsh_exit" ]; then
103
+    if [ "$posix_norm" = "$shell_norm" ] && [ "$posix_exit" = "$shell_exit" ]; then
104104
         pass "$test_name"
105105
     else
106
-        fail "$test_name" "$posix_output" "$fortsh_output"
106
+        fail "$test_name" "$posix_output" "$shell_output"
107107
     fi
108108
 }
109109
 
suites/posix/posix_compliance_extended.shmodified
@@ -1,6 +1,6 @@
11
 #!/bin/sh
22
 # =====================================
3
-# POSIX Compliance Extended Test Suite for fortsh
3
+# POSIX Compliance Extended Test Suite for shell
44
 # =====================================
55
 # Comprehensive POSIX compliance testing based on IEEE Std 1003.1-2017
66
 # This extends the basic test suite with additional coverage
@@ -27,7 +27,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 BASH_REF="${BASH_REF:-bash}"
2929
 
30
-# Check if fortsh exists
30
+# Check if shell binary exists
3131
 if [ ! -x "$SHELL_BIN" ]; then
3232
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3333
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -50,7 +50,7 @@ fail() {
5050
         printf "  posix:  %s\n" "$2"
5151
     fi
5252
     if [ -n "$3" ]; then
53
-        printf "  fortsh: %s\n" "$3"
53
+        printf "  shell: %s\n" "$3"
5454
     fi
5555
     FAILED=$((FAILED + 1))
5656
 }
@@ -76,22 +76,22 @@ compare_posix_output() {
7676
     test_name="$1"
7777
     command="$2"
7878
     posix_file="/tmp/posix_ext_$$_posix"
79
-    fortsh_file="/tmp/posix_ext_$$_fortsh"
79
+    shell_file="/tmp/posix_ext_$$_fortsh"
8080
 
8181
     # Run in POSIX shell (sh)
8282
     "$BASH_REF" -c "$command" > "$posix_file" 2>&1 || true
8383
 
84
-    # Run in fortsh
85
-    "$SHELL_BIN" -c "$command" > "$fortsh_file" 2>&1 || true
84
+    # Run in shell under test
85
+    "$SHELL_BIN" -c "$command" > "$shell_file" 2>&1 || true
8686
 
8787
     # Compare outputs
88
-    if diff -q "$posix_file" "$fortsh_file" > /dev/null 2>&1; then
88
+    if diff -q "$posix_file" "$shell_file" > /dev/null 2>&1; then
8989
         pass "$test_name"
9090
     else
91
-        fail "$test_name" "$(cat "$posix_file")" "$(cat "$fortsh_file")"
91
+        fail "$test_name" "$(cat "$posix_file")" "$(cat "$shell_file")"
9292
     fi
9393
 
94
-    rm -f "$posix_file" "$fortsh_file"
94
+    rm -f "$posix_file" "$shell_file"
9595
 }
9696
 
9797
 # Helper function to compare exit codes
@@ -103,12 +103,12 @@ compare_posix_exit_code() {
103103
     posix_exit=$?
104104
 
105105
     "$SHELL_BIN" -c "$command" > /dev/null 2>&1
106
-    fortsh_exit=$?
106
+    shell_exit=$?
107107
 
108
-    if [ "$posix_exit" -eq "$fortsh_exit" ]; then
108
+    if [ "$posix_exit" -eq "$shell_exit" ]; then
109109
         pass "$test_name"
110110
     else
111
-        fail "$test_name" "exit=$posix_exit" "exit=$fortsh_exit"
111
+        fail "$test_name" "exit=$posix_exit" "exit=$shell_exit"
112112
     fi
113113
 }
114114
 
suites/posix/posix_compliance_filetest.shmodified
@@ -1,6 +1,6 @@
11
 #!/bin/sh
22
 # =====================================
3
-# POSIX Compliance File Test Operators Suite for fortsh
3
+# POSIX Compliance File Test Operators Suite for shell
44
 # =====================================
55
 # Tests test/[ builtin file and string operators per IEEE Std 1003.1-2017
66
 # Section: Shell Command Language - Conditional Expressions
@@ -26,7 +26,7 @@ FAILED_TESTS_LIST=""
2626
 SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 
29
-# Check if fortsh exists
29
+# Check if shell binary exists
3030
 if [ ! -x "$SHELL_BIN" ]; then
3131
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3232
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -71,7 +71,7 @@ section() {
7171
 
7272
 # Create test directory with test files
7373
 setup_test_files() {
74
-    TEST_DIR="/tmp/fortsh_filetest_$$"
74
+    TEST_DIR="/tmp/shell_filetest_$$"
7575
     mkdir -p "$TEST_DIR"
7676
     cd "$TEST_DIR" || exit 1
7777
 
suites/posix/posix_compliance_gaps.shmodified
@@ -43,7 +43,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
4343
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
4444
 BASH_REF="${BASH_REF:-bash}"
4545
 
46
-# Check if fortsh exists
46
+# Check if shell binary exists
4747
 if [ ! -x "$SHELL_BIN" ]; then
4848
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
4949
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -66,7 +66,7 @@ fail() {
6666
         printf "  posix:  %s\n" "$2"
6767
     fi
6868
     if [ -n "$3" ]; then
69
-        printf "  fortsh: %s\n" "$3"
69
+        printf "  shell: %s\n" "$3"
7070
     fi
7171
     FAILED=$((FAILED + 1))
7272
 }
@@ -89,7 +89,7 @@ section() {
8989
 
9090
 # Normalize shell error messages by stripping shell name and "line N: " prefix
9191
 normalize_output() {
92
-    sed -e 's|^[^ ]*bash: |sh: |' -e 's|^[^ ]*fortsh: |sh: |' -e 's/line [0-9]*: //'
92
+    sed -e 's|^[^ ]*/[a-z]*sh[0-9]*: |sh: |' -e 's|^[a-z]*sh[0-9]*: |sh: |' -e 's/line [0-9]*: //'
9393
 }
9494
 
9595
 # Helper function to run command in both shells and compare
@@ -97,28 +97,28 @@ compare_posix_output() {
9797
     test_name="$1"
9898
     command="$2"
9999
     posix_file="/tmp/posix_gaps_$$_posix"
100
-    fortsh_file="/tmp/posix_gaps_$$_fortsh"
100
+    shell_file="/tmp/posix_gaps_$$_fortsh"
101101
 
102102
     # Run in POSIX shell (sh)
103103
     "$BASH_REF" -c "$command" 2>&1 | normalize_output > "$posix_file" || true
104104
 
105
-    # Run in fortsh
106
-    "$SHELL_BIN" -c "$command" 2>&1 | normalize_output > "$fortsh_file" || true
105
+    # Run in shell under test
106
+    "$SHELL_BIN" -c "$command" 2>&1 | normalize_output > "$shell_file" || true
107107
 
108108
     # Compare outputs
109
-    if diff -q "$posix_file" "$fortsh_file" > /dev/null 2>&1; then
109
+    if diff -q "$posix_file" "$shell_file" > /dev/null 2>&1; then
110110
         pass "$test_name"
111111
     else
112
-        fail "$test_name" "$(cat "$posix_file")" "$(cat "$fortsh_file")"
112
+        fail "$test_name" "$(cat "$posix_file")" "$(cat "$shell_file")"
113113
     fi
114114
 
115
-    rm -f "$posix_file" "$fortsh_file"
115
+    rm -f "$posix_file" "$shell_file"
116116
 }
117117
 
118118
 # Normalize shell error messages by stripping shell name and "line N: " prefix
119119
 # POSIX doesn't mandate error message format, so we normalize for comparison
120120
 normalize_error() {
121
-    echo "$1" | sed -e 's|^[^ ]*bash: |sh: |' -e 's|^[^ ]*fortsh: |sh: |' -e 's/line [0-9]*: //'
121
+    echo "$1" | sed -e 's|^[^ ]*/[a-z]*sh[0-9]*: |sh: |' -e 's|^[a-z]*sh[0-9]*: |sh: |' -e 's/line [0-9]*: //'
122122
 }
123123
 
124124
 # Compare error output, normalizing line number differences
@@ -126,25 +126,25 @@ compare_posix_error() {
126126
     test_name="$1"
127127
     command="$2"
128128
     posix_file="/tmp/posix_gaps_$$_posix"
129
-    fortsh_file="/tmp/posix_gaps_$$_fortsh"
129
+    shell_file="/tmp/posix_gaps_$$_fortsh"
130130
 
131131
     # Run in POSIX shell (sh)
132132
     "$BASH_REF" -c "$command" > "$posix_file" 2>&1 || true
133133
 
134
-    # Run in fortsh
135
-    "$SHELL_BIN" -c "$command" > "$fortsh_file" 2>&1 || true
134
+    # Run in shell under test
135
+    "$SHELL_BIN" -c "$command" > "$shell_file" 2>&1 || true
136136
 
137137
     # Normalize error messages before comparison
138138
     posix_norm=$(normalize_error "$(cat "$posix_file")")
139
-    fortsh_norm=$(normalize_error "$(cat "$fortsh_file")")
139
+    shell_norm=$(normalize_error "$(cat "$shell_file")")
140140
 
141
-    if [ "$posix_norm" = "$fortsh_norm" ]; then
141
+    if [ "$posix_norm" = "$shell_norm" ]; then
142142
         pass "$test_name"
143143
     else
144
-        fail "$test_name" "$(cat "$posix_file")" "$(cat "$fortsh_file")"
144
+        fail "$test_name" "$(cat "$posix_file")" "$(cat "$shell_file")"
145145
     fi
146146
 
147
-    rm -f "$posix_file" "$fortsh_file"
147
+    rm -f "$posix_file" "$shell_file"
148148
 }
149149
 
150150
 # Helper function to compare exit codes
@@ -156,16 +156,16 @@ compare_posix_exit_code() {
156156
     posix_exit=$?
157157
 
158158
     "$SHELL_BIN" -c "$command" > /dev/null 2>&1
159
-    fortsh_exit=$?
159
+    shell_exit=$?
160160
 
161
-    if [ "$posix_exit" -eq "$fortsh_exit" ]; then
161
+    if [ "$posix_exit" -eq "$shell_exit" ]; then
162162
         pass "$test_name"
163163
     else
164
-        fail "$test_name" "exit=$posix_exit" "exit=$fortsh_exit"
164
+        fail "$test_name" "exit=$posix_exit" "exit=$shell_exit"
165165
         # Accumulate debug info for CI summary
166166
         DEBUG_INFO="${DEBUG_INFO}DEBUG [$test_name]: cmd='$command'\n"
167167
         DEBUG_INFO="${DEBUG_INFO}  bash exit: $posix_exit\n"
168
-        DEBUG_INFO="${DEBUG_INFO}  fortsh exit: $fortsh_exit\n"
168
+        DEBUG_INFO="${DEBUG_INFO}  fortsh exit: $shell_exit\n"
169169
     fi
170170
 }
171171
 
suites/posix/posix_compliance_heredoc.shmodified
@@ -1,6 +1,6 @@
11
 #!/bin/sh
22
 # =====================================
3
-# POSIX Compliance Here-Document and Expansion Test Suite for fortsh
3
+# POSIX Compliance Here-Document and Expansion Test Suite for shell
44
 # =====================================
55
 # Tests here-documents and parameter expansion per IEEE Std 1003.1-2017
66
 # Section: Shell Command Language - Here-Documents, Parameter Expansion
@@ -26,7 +26,7 @@ FAILED_TESTS_LIST=""
2626
 SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 
29
-# Check if fortsh exists
29
+# Check if shell binary exists
3030
 if [ ! -x "$SHELL_BIN" ]; then
3131
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3232
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -181,7 +181,7 @@ elif command -v gtimeout >/dev/null 2>&1; then
181181
 else
182182
     _timeout() {
183183
         _to_secs="$1"; shift
184
-        _to_tmp=$(mktemp /tmp/fortsh_timeout.XXXXXX)
184
+        _to_tmp=$(mktemp /tmp/bensch_timeout.XXXXXX)
185185
         ( "$@" ) > "$_to_tmp" 2>&1 &
186186
         _to_pid=$!
187187
         ( sleep "$_to_secs"; kill "$_to_pid" 2>/dev/null ) &
suites/posix/posix_compliance_jobcontrol.shmodified
@@ -25,7 +25,7 @@ FAILED_TESTS_LIST=""
2525
 SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2626
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2727
 
28
-# Check if fortsh exists
28
+# Check if shell binary exists
2929
 if [ ! -x "$SHELL_BIN" ]; then
3030
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3131
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
suites/posix/posix_compliance_options.shmodified
@@ -1,6 +1,6 @@
11
 #!/bin/sh
22
 # =====================================
3
-# POSIX Compliance Shell Options and Read Builtin Test Suite for fortsh
3
+# POSIX Compliance Shell Options and Read Builtin Test Suite for shell
44
 # =====================================
55
 # Tests set options and read builtin per IEEE Std 1003.1-2017
66
 # Section: Shell Command Language - set, read
@@ -27,7 +27,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 BASH_REF="${BASH_REF:-bash}"
2929
 
30
-# Check if fortsh exists
30
+# Check if shell binary exists
3131
 if [ ! -x "$SHELL_BIN" ]; then
3232
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3333
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -196,20 +196,20 @@ section "386. SET -v (VERBOSE)"
196196
 # Note: set -v only echoes lines as they're READ, not from -c argument
197197
 # Test that -v option is accepted and runs without error
198198
 "$SHELL_BIN" -c 'set -v; echo hello' >/dev/null 2>&1
199
-fortsh_exit=$?
199
+shell_exit=$?
200200
 "$BASH_REF" -c 'set -v; echo hello' >/dev/null 2>&1
201201
 bash_exit=$?
202
-if [ "$fortsh_exit" -eq "$bash_exit" ]; then
202
+if [ "$shell_exit" -eq "$bash_exit" ]; then
203203
     pass "set -v runs without error"
204204
 else
205
-    fail "set -v runs without error" "exit=$bash_exit" "exit=$fortsh_exit"
205
+    fail "set -v runs without error" "exit=$bash_exit" "exit=$shell_exit"
206206
 fi
207207
 
208208
 # =====================================
209209
 section "387. SET -C (NOCLOBBER)"
210210
 # =====================================
211211
 
212
-TEST_DIR="/tmp/fortsh_options_$$"
212
+TEST_DIR="/tmp/bensch_options_$$"
213213
 mkdir -p "$TEST_DIR"
214214
 
215215
 result=$("$SHELL_BIN" -c 'set -C; echo test > '"$TEST_DIR"'/clobber1; echo test2 > '"$TEST_DIR"'/clobber1' 2>&1)
suites/posix/posix_compliance_printf.shmodified
@@ -1,6 +1,6 @@
11
 #!/bin/sh
22
 # =====================================
3
-# POSIX Compliance printf Builtin Test Suite for fortsh
3
+# POSIX Compliance printf Builtin Test Suite for shell
44
 # =====================================
55
 # Tests the printf builtin command per IEEE Std 1003.1-2017
66
 # Section: Shell & Utilities - printf
@@ -26,7 +26,7 @@ FAILED_TESTS_LIST=""
2626
 SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 
29
-# Check if fortsh exists
29
+# Check if shell binary exists
3030
 if [ ! -x "$SHELL_BIN" ]; then
3131
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3232
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
suites/posix/posix_compliance_quoting.shmodified
@@ -1,6 +1,6 @@
11
 #!/bin/sh
22
 # =====================================
3
-# POSIX Compliance Quoting Test Suite for fortsh
3
+# POSIX Compliance Quoting Test Suite for shell
44
 # =====================================
55
 # Tests quoting and escaping per IEEE Std 1003.1-2017
66
 # Section: Shell Command Language - Quoting
@@ -26,7 +26,7 @@ FAILED_TESTS_LIST=""
2626
 SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 
29
-# Check if fortsh exists
29
+# Check if shell binary exists
3030
 if [ ! -x "$SHELL_BIN" ]; then
3131
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3232
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
suites/posix/posix_compliance_redirect.shmodified
@@ -1,6 +1,6 @@
11
 #!/bin/sh
22
 # =====================================
3
-# POSIX Compliance Redirection and Pipeline Test Suite for fortsh
3
+# POSIX Compliance Redirection and Pipeline Test Suite for shell
44
 # =====================================
55
 # Tests redirections and pipelines per IEEE Std 1003.1-2017
66
 # Section: Shell Command Language - Redirection
@@ -26,7 +26,7 @@ FAILED_TESTS_LIST=""
2626
 SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 
29
-# Check if fortsh exists
29
+# Check if shell binary exists
3030
 if [ ! -x "$SHELL_BIN" ]; then
3131
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3232
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -69,7 +69,7 @@ section() {
6969
     printf "==========================================${NC}\n"
7070
 }
7171
 
72
-TEST_DIR="/tmp/fortsh_redirect_$$"
72
+TEST_DIR="/tmp/bensch_redirect_$$"
7373
 mkdir -p "$TEST_DIR"
7474
 
7575
 cleanup() {
suites/posix/posix_compliance_special.shmodified
@@ -26,7 +26,7 @@ FAILED_TESTS_LIST=""
2626
 SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 
29
-# Check if fortsh exists
29
+# Check if shell binary exists
3030
 if [ ! -x "$SHELL_BIN" ]; then
3131
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3232
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
suites/posix/posix_compliance_test.shmodified
@@ -1,6 +1,6 @@
11
 #!/bin/sh
22
 # =====================================
3
-# POSIX Compliance Test Suite for fortsh
3
+# POSIX Compliance Test Suite for shell
44
 # =====================================
55
 # Tests compliance with POSIX shell specification
66
 # Uses /bin/sh for comparison (typically dash or bash in POSIX mode)
@@ -30,7 +30,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
3030
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
3131
 BASH_REF="${BASH_REF:-bash}"
3232
 
33
-# Check if fortsh exists
33
+# Check if shell binary exists
3434
 if [ ! -x "$SHELL_BIN" ]; then
3535
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3636
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -53,7 +53,7 @@ fail() {
5353
         printf "  posix:  %s\n" "$2"
5454
     fi
5555
     if [ -n "$3" ]; then
56
-        printf "  fortsh: %s\n" "$3"
56
+        printf "  shell: %s\n" "$3"
5757
     fi
5858
     FAILED=$((FAILED + 1))
5959
 }
@@ -79,22 +79,22 @@ compare_posix_output() {
7979
     test_name="$1"
8080
     command="$2"
8181
     posix_file="/tmp/posix_comp_$$_posix"
82
-    fortsh_file="/tmp/posix_comp_$$_fortsh"
82
+    shell_file="/tmp/posix_comp_$$_fortsh"
8383
 
8484
     # Run in POSIX shell (sh)
8585
     "$BASH_REF" -c "$command" > "$posix_file" 2>&1 || true
8686
 
87
-    # Run in fortsh
88
-    "$SHELL_BIN" -c "$command" > "$fortsh_file" 2>&1 || true
87
+    # Run in shell under test
88
+    "$SHELL_BIN" -c "$command" > "$shell_file" 2>&1 || true
8989
 
9090
     # Compare outputs
91
-    if diff -q "$posix_file" "$fortsh_file" > /dev/null 2>&1; then
91
+    if diff -q "$posix_file" "$shell_file" > /dev/null 2>&1; then
9292
         pass "$test_name"
9393
     else
94
-        fail "$test_name" "$(cat "$posix_file")" "$(cat "$fortsh_file")"
94
+        fail "$test_name" "$(cat "$posix_file")" "$(cat "$shell_file")"
9595
     fi
9696
 
97
-    rm -f "$posix_file" "$fortsh_file"
97
+    rm -f "$posix_file" "$shell_file"
9898
 }
9999
 
100100
 # Helper function to compare exit codes
@@ -106,12 +106,12 @@ compare_posix_exit_code() {
106106
     posix_exit=$?
107107
 
108108
     "$SHELL_BIN" -c "$command" > /dev/null 2>&1
109
-    fortsh_exit=$?
109
+    shell_exit=$?
110110
 
111
-    if [ "$posix_exit" -eq "$fortsh_exit" ]; then
111
+    if [ "$posix_exit" -eq "$shell_exit" ]; then
112112
         pass "$test_name"
113113
     else
114
-        fail "$test_name" "exit=$posix_exit" "exit=$fortsh_exit"
114
+        fail "$test_name" "exit=$posix_exit" "exit=$shell_exit"
115115
     fi
116116
 }
117117
 
suites/posix/posix_compliance_untested.shmodified
@@ -26,7 +26,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2626
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2727
 BASH_REF="${BASH_REF:-bash}"
2828
 
29
-# Check if fortsh exists
29
+# Check if shell binary exists
3030
 if [ ! -x "$SHELL_BIN" ]; then
3131
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3232
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -49,7 +49,7 @@ fail() {
4949
         printf "  posix:         %s\n" "$2"
5050
     fi
5151
     if [ -n "$3" ]; then
52
-        printf "  fortsh:        %s\n" "$3"
52
+        printf "  shell:        %s\n" "$3"
5353
     fi
5454
     FAILED=$((FAILED + 1))
5555
 }
@@ -79,21 +79,21 @@ compare_posix_output() {
7979
     posix_exit=$?
8080
 
8181
     # Run with fortsh
82
-    fortsh_output=$(FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c "$test_cmd" 2>&1)
83
-    fortsh_exit=$?
82
+    shell_output=$(FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c "$test_cmd" 2>&1)
83
+    shell_exit=$?
8484
 
8585
     # Compare outputs
86
-    if [ "$posix_output" = "$fortsh_output" ] && [ "$posix_exit" = "$fortsh_exit" ]; then
86
+    if [ "$posix_output" = "$shell_output" ] && [ "$posix_exit" = "$shell_exit" ]; then
8787
         pass "$test_name"
8888
     else
89
-        fail "$test_name" "$posix_output" "$fortsh_output"
89
+        fail "$test_name" "$posix_output" "$shell_output"
9090
     fi
9191
 }
9292
 
9393
 # Normalize shell error messages by stripping shell name and "line N: " prefix
9494
 # POSIX doesn't mandate error message format, so we normalize for comparison
9595
 normalize_error() {
96
-    echo "$1" | sed -e 's|^[^ ]*bash: |sh: |' -e 's|^[^ ]*fortsh: |sh: |' -e 's/line [0-9]*: //'
96
+    echo "$1" | sed -e 's|^[^ ]*/[a-z]*sh[0-9]*: |sh: |' -e 's|^[a-z]*sh[0-9]*: |sh: |' -e 's/line [0-9]*: //'
9797
 }
9898
 
9999
 # Compare error output, normalizing line number differences
@@ -104,16 +104,16 @@ compare_posix_error() {
104104
     posix_output=$(FORTSH_RC_FILE=/dev/null "$BASH_REF" -c "$test_cmd" 2>&1)
105105
     posix_exit=$?
106106
 
107
-    fortsh_output=$(FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c "$test_cmd" 2>&1)
108
-    fortsh_exit=$?
107
+    shell_output=$(FORTSH_RC_FILE=/dev/null "$SHELL_BIN" -c "$test_cmd" 2>&1)
108
+    shell_exit=$?
109109
 
110110
     posix_norm=$(normalize_error "$posix_output")
111
-    fortsh_norm=$(normalize_error "$fortsh_output")
111
+    shell_norm=$(normalize_error "$shell_output")
112112
 
113
-    if [ "$posix_norm" = "$fortsh_norm" ] && [ "$posix_exit" = "$fortsh_exit" ]; then
113
+    if [ "$posix_norm" = "$shell_norm" ] && [ "$posix_exit" = "$shell_exit" ]; then
114114
         pass "$test_name"
115115
     else
116
-        fail "$test_name" "$posix_output" "$fortsh_output"
116
+        fail "$test_name" "$posix_output" "$shell_output"
117117
     fi
118118
 }
119119
 
suites/posix/posix_gaps_arithmetic.shmodified
@@ -27,7 +27,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 BASH_REF="${BASH_REF:-bash}"
2929
 
30
-# Check if fortsh exists
30
+# Check if shell binary exists
3131
 if [ ! -x "$SHELL_BIN" ]; then
3232
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3333
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -46,7 +46,7 @@ fail() {
4646
     printf "${RED}✗ FAIL${NC} ${TEST_ID}: %s\n" "$1"
4747
     FAILED_TESTS_LIST="${FAILED_TESTS_LIST}  ${TEST_ID}: $1\n"
4848
     if [ -n "$2" ]; then printf "  posix:  %s\n" "$2"; fi
49
-    if [ -n "$3" ]; then printf "  fortsh: %s\n" "$3"; fi
49
+    if [ -n "$3" ]; then printf "  shell: %s\n" "$3"; fi
5050
     FAILED=$((FAILED + 1))
5151
 }
5252
 
@@ -56,22 +56,22 @@ section() {
5656
     printf "\n${BLUE}==========================================\n%s\n==========================================${NC}\n" "$1"
5757
 }
5858
 
59
-normalize_output() { sed -e 's|^[^ ]*bash: |sh: |' -e 's|^[^ ]*fortsh: |sh: |' -e 's/line [0-9]*: //'; }
59
+normalize_output() { sed -e 's|^[^ ]*/[a-z]*sh[0-9]*: |sh: |' -e 's|^[a-z]*sh[0-9]*: |sh: |' -e 's/line [0-9]*: //'; }
6060
 
6161
 compare_posix_output() {
6262
     test_name="$1"; command="$2"
6363
     posix_out=$("$BASH_REF" -c "$command" 2>&1 | normalize_output)
64
-    fortsh_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
65
-    if [ "$posix_out" = "$fortsh_out" ]; then pass "$test_name"
66
-    else fail "$test_name" "$posix_out" "$fortsh_out"; fi
64
+    shell_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
65
+    if [ "$posix_out" = "$shell_out" ]; then pass "$test_name"
66
+    else fail "$test_name" "$posix_out" "$shell_out"; fi
6767
 }
6868
 
6969
 compare_posix_exit_code() {
7070
     test_name="$1"; command="$2"
7171
     "$BASH_REF" -c "$command" >/dev/null 2>&1; posix_code=$?
72
-    "$SHELL_BIN" -c "$command" >/dev/null 2>&1; fortsh_code=$?
73
-    if [ "$posix_code" = "$fortsh_code" ]; then pass "$test_name"
74
-    else fail "$test_name" "exit $posix_code" "exit $fortsh_code"; fi
72
+    "$SHELL_BIN" -c "$command" >/dev/null 2>&1; shell_code=$?
73
+    if [ "$posix_code" = "$shell_code" ]; then pass "$test_name"
74
+    else fail "$test_name" "exit $posix_code" "exit $shell_code"; fi
7575
 }
7676
 
7777
 # ============================================================================
suites/posix/posix_gaps_builtins.shmodified
@@ -27,7 +27,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 BASH_REF="${BASH_REF:-bash}"
2929
 
30
-# Check if fortsh exists
30
+# Check if shell binary exists
3131
 if [ ! -x "$SHELL_BIN" ]; then
3232
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3333
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -46,7 +46,7 @@ fail() {
4646
     printf "${RED}✗ FAIL${NC} ${TEST_ID}: %s\n" "$1"
4747
     FAILED_TESTS_LIST="${FAILED_TESTS_LIST}  ${TEST_ID}: $1\n"
4848
     if [ -n "$2" ]; then printf "  posix:  %s\n" "$2"; fi
49
-    if [ -n "$3" ]; then printf "  fortsh: %s\n" "$3"; fi
49
+    if [ -n "$3" ]; then printf "  shell: %s\n" "$3"; fi
5050
     FAILED=$((FAILED + 1))
5151
 }
5252
 
@@ -56,30 +56,30 @@ section() {
5656
     printf "\n${BLUE}==========================================\n%s\n==========================================${NC}\n" "$1"
5757
 }
5858
 
59
-normalize_output() { sed -e 's|^[^ ]*bash: |sh: |' -e 's|^[^ ]*fortsh: |sh: |' -e 's/line [0-9]*: //'; }
59
+normalize_output() { sed -e 's|^[^ ]*/[a-z]*sh[0-9]*: |sh: |' -e 's|^[a-z]*sh[0-9]*: |sh: |' -e 's/line [0-9]*: //'; }
6060
 
6161
 compare_posix_output() {
6262
     test_name="$1"; command="$2"
6363
     posix_out=$("$BASH_REF" -c "$command" 2>&1 | normalize_output)
64
-    fortsh_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
65
-    if [ "$posix_out" = "$fortsh_out" ]; then pass "$test_name"
66
-    else fail "$test_name" "$posix_out" "$fortsh_out"; fi
64
+    shell_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
65
+    if [ "$posix_out" = "$shell_out" ]; then pass "$test_name"
66
+    else fail "$test_name" "$posix_out" "$shell_out"; fi
6767
 }
6868
 
6969
 compare_posix_exit_code() {
7070
     test_name="$1"; command="$2"
7171
     "$BASH_REF" -c "$command" >/dev/null 2>&1; posix_code=$?
72
-    "$SHELL_BIN" -c "$command" >/dev/null 2>&1; fortsh_code=$?
73
-    if [ "$posix_code" = "$fortsh_code" ]; then pass "$test_name"
74
-    else fail "$test_name" "exit $posix_code" "exit $fortsh_code"; fi
72
+    "$SHELL_BIN" -c "$command" >/dev/null 2>&1; shell_code=$?
73
+    if [ "$posix_code" = "$shell_code" ]; then pass "$test_name"
74
+    else fail "$test_name" "exit $posix_code" "exit $shell_code"; fi
7575
 }
7676
 
7777
 compare_posix_error() {
7878
     test_name="$1"; command="$2"
7979
     posix_out=$("$BASH_REF" -c "$command" 2>&1 | normalize_output)
80
-    fortsh_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
81
-    if [ "$posix_out" = "$fortsh_out" ]; then pass "$test_name"
82
-    else fail "$test_name" "$posix_out" "$fortsh_out"; fi
80
+    shell_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
81
+    if [ "$posix_out" = "$shell_out" ]; then pass "$test_name"
82
+    else fail "$test_name" "$posix_out" "$shell_out"; fi
8383
 }
8484
 
8585
 # ============================================================================
suites/posix/posix_gaps_charclass.shmodified
@@ -27,7 +27,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 BASH_REF="${BASH_REF:-bash}"
2929
 
30
-# Check if fortsh exists
30
+# Check if shell binary exists
3131
 if [ ! -x "$SHELL_BIN" ]; then
3232
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3333
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -46,7 +46,7 @@ fail() {
4646
     printf "${RED}✗ FAIL${NC} ${TEST_ID}: %s\n" "$1"
4747
     FAILED_TESTS_LIST="${FAILED_TESTS_LIST}  ${TEST_ID}: $1\n"
4848
     if [ -n "$2" ]; then printf "  posix:  %s\n" "$2"; fi
49
-    if [ -n "$3" ]; then printf "  fortsh: %s\n" "$3"; fi
49
+    if [ -n "$3" ]; then printf "  shell: %s\n" "$3"; fi
5050
     FAILED=$((FAILED + 1))
5151
 }
5252
 
@@ -56,14 +56,14 @@ section() {
5656
     printf "\n${BLUE}==========================================\n%s\n==========================================${NC}\n" "$1"
5757
 }
5858
 
59
-normalize_output() { sed -e 's|^[^ ]*bash: |sh: |' -e 's|^[^ ]*fortsh: |sh: |' -e 's/line [0-9]*: //'; }
59
+normalize_output() { sed -e 's|^[^ ]*/[a-z]*sh[0-9]*: |sh: |' -e 's|^[a-z]*sh[0-9]*: |sh: |' -e 's/line [0-9]*: //'; }
6060
 
6161
 compare_posix_output() {
6262
     test_name="$1"; command="$2"
6363
     posix_out=$("$BASH_REF" -c "$command" 2>&1 | normalize_output)
64
-    fortsh_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
65
-    if [ "$posix_out" = "$fortsh_out" ]; then pass "$test_name"
66
-    else fail "$test_name" "$posix_out" "$fortsh_out"; fi
64
+    shell_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
65
+    if [ "$posix_out" = "$shell_out" ]; then pass "$test_name"
66
+    else fail "$test_name" "$posix_out" "$shell_out"; fi
6767
 }
6868
 
6969
 # ============================================================================
suites/posix/posix_gaps_control.shmodified
@@ -27,7 +27,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 BASH_REF="${BASH_REF:-bash}"
2929
 
30
-# Check if fortsh exists
30
+# Check if shell binary exists
3131
 if [ ! -x "$SHELL_BIN" ]; then
3232
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3333
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -46,7 +46,7 @@ fail() {
4646
     printf "${RED}✗ FAIL${NC} ${TEST_ID}: %s\n" "$1"
4747
     FAILED_TESTS_LIST="${FAILED_TESTS_LIST}  ${TEST_ID}: $1\n"
4848
     if [ -n "$2" ]; then printf "  posix:  %s\n" "$2"; fi
49
-    if [ -n "$3" ]; then printf "  fortsh: %s\n" "$3"; fi
49
+    if [ -n "$3" ]; then printf "  shell: %s\n" "$3"; fi
5050
     FAILED=$((FAILED + 1))
5151
 }
5252
 
@@ -56,14 +56,14 @@ section() {
5656
     printf "\n${BLUE}==========================================\n%s\n==========================================${NC}\n" "$1"
5757
 }
5858
 
59
-normalize_output() { sed -e 's|^[^ ]*bash: |sh: |' -e 's|^[^ ]*fortsh: |sh: |' -e 's/line [0-9]*: //'; }
59
+normalize_output() { sed -e 's|^[^ ]*/[a-z]*sh[0-9]*: |sh: |' -e 's|^[a-z]*sh[0-9]*: |sh: |' -e 's/line [0-9]*: //'; }
6060
 
6161
 compare_posix_output() {
6262
     test_name="$1"; command="$2"
6363
     posix_out=$("$BASH_REF" -c "$command" 2>&1 | normalize_output)
64
-    fortsh_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
65
-    if [ "$posix_out" = "$fortsh_out" ]; then pass "$test_name"
66
-    else fail "$test_name" "$posix_out" "$fortsh_out"; fi
64
+    shell_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
65
+    if [ "$posix_out" = "$shell_out" ]; then pass "$test_name"
66
+    else fail "$test_name" "$posix_out" "$shell_out"; fi
6767
 }
6868
 
6969
 # ============================================================================
@@ -99,12 +99,12 @@ compare_posix_output "for with continue" 'for i in 1 2 3; do if [ $i = 2 ]; then
9999
 # Inline test with debug output for CI diagnosis
100100
 _glob_cmd="touch /tmp/posix_gaps_for1_$$.txt /tmp/posix_gaps_for2_$$.txt /tmp/posix_gaps_for3_$$.txt 2>/dev/null; for f in /tmp/posix_gaps_for*_$$.txt; do test -f \$f && echo yes; done | head -1; rm -f /tmp/posix_gaps_for*_$$.txt"
101101
 _glob_posix=$("$BASH_REF" -c "$_glob_cmd" 2>&1)
102
-_glob_fortsh=$("$SHELL_BIN" -c "$_glob_cmd" 2>&1)
103
-_glob_debug="[DEBUG glob] posix_hex=[$(printf '%s' "$_glob_posix" | od -A n -t x1 | tr -d '\n')] fortsh_hex=[$(printf '%s' "$_glob_fortsh" | od -A n -t x1 | tr -d '\n')] posix_raw=[$_glob_posix] fortsh_raw=[$_glob_fortsh]"
102
+_glob_shell=$("$SHELL_BIN" -c "$_glob_cmd" 2>&1)
103
+_glob_debug="[DEBUG glob] posix_hex=[$(printf '%s' "$_glob_posix" | od -A n -t x1 | tr -d '\n')] shell_hex=[$(printf '%s' "$_glob_shell" | od -A n -t x1 | tr -d '\n')] posix_raw=[$_glob_posix] shell_raw=[$_glob_shell]"
104104
 _glob_posix_n=$(printf '%s' "$_glob_posix" | normalize_output)
105
-_glob_fortsh_n=$(printf '%s' "$_glob_fortsh" | normalize_output)
106
-if [ "$_glob_posix_n" = "$_glob_fortsh_n" ]; then pass "for glob expansion"
107
-else fail "for glob expansion" "$_glob_posix_n" "$_glob_fortsh_n"; fi
105
+_glob_shell_n=$(printf '%s' "$_glob_shell" | normalize_output)
106
+if [ "$_glob_posix_n" = "$_glob_shell_n" ]; then pass "for glob expansion"
107
+else fail "for glob expansion" "$_glob_posix_n" "$_glob_shell_n"; fi
108108
 compare_posix_output "for preserves IFS" "IFS=:; for i in a b c; do echo \$i; done; echo \$IFS | od -A n -t x1 | grep -c 3a"
109109
 
110110
 # ============================================================================
suites/posix/posix_gaps_heredoc.shmodified
@@ -27,7 +27,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 BASH_REF="${BASH_REF:-bash}"
2929
 
30
-# Check if fortsh exists
30
+# Check if shell binary exists
3131
 if [ ! -x "$SHELL_BIN" ]; then
3232
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3333
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -46,7 +46,7 @@ fail() {
4646
     printf "${RED}✗ FAIL${NC} ${TEST_ID}: %s\n" "$1"
4747
     FAILED_TESTS_LIST="${FAILED_TESTS_LIST}  ${TEST_ID}: $1\n"
4848
     if [ -n "$2" ]; then printf "  posix:  %s\n" "$2"; fi
49
-    if [ -n "$3" ]; then printf "  fortsh: %s\n" "$3"; fi
49
+    if [ -n "$3" ]; then printf "  shell: %s\n" "$3"; fi
5050
     FAILED=$((FAILED + 1))
5151
 }
5252
 
@@ -56,22 +56,22 @@ section() {
5656
     printf "\n${BLUE}==========================================\n%s\n==========================================${NC}\n" "$1"
5757
 }
5858
 
59
-normalize_output() { sed -e 's|^[^ ]*bash: |sh: |' -e 's|^[^ ]*fortsh: |sh: |' -e 's/line [0-9]*: //'; }
59
+normalize_output() { sed -e 's|^[^ ]*/[a-z]*sh[0-9]*: |sh: |' -e 's|^[a-z]*sh[0-9]*: |sh: |' -e 's/line [0-9]*: //'; }
6060
 
6161
 compare_posix_output() {
6262
     test_name="$1"; command="$2"
6363
     posix_out=$("$BASH_REF" -c "$command" 2>&1 | normalize_output)
64
-    fortsh_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
65
-    if [ "$posix_out" = "$fortsh_out" ]; then pass "$test_name"
66
-    else fail "$test_name" "$posix_out" "$fortsh_out"; fi
64
+    shell_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
65
+    if [ "$posix_out" = "$shell_out" ]; then pass "$test_name"
66
+    else fail "$test_name" "$posix_out" "$shell_out"; fi
6767
 }
6868
 
6969
 compare_posix_exit_code() {
7070
     test_name="$1"; command="$2"
7171
     "$BASH_REF" -c "$command" >/dev/null 2>&1; posix_code=$?
72
-    "$SHELL_BIN" -c "$command" >/dev/null 2>&1; fortsh_code=$?
73
-    if [ "$posix_code" = "$fortsh_code" ]; then pass "$test_name"
74
-    else fail "$test_name" "exit $posix_code" "exit $fortsh_code"; fi
72
+    "$SHELL_BIN" -c "$command" >/dev/null 2>&1; shell_code=$?
73
+    if [ "$posix_code" = "$shell_code" ]; then pass "$test_name"
74
+    else fail "$test_name" "exit $posix_code" "exit $shell_code"; fi
7575
 }
7676
 
7777
 # ============================================================================
suites/posix/posix_gaps_quoting.shmodified
@@ -27,7 +27,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 BASH_REF="${BASH_REF:-bash}"
2929
 
30
-# Check if fortsh exists
30
+# Check if shell binary exists
3131
 if [ ! -x "$SHELL_BIN" ]; then
3232
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3333
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -46,7 +46,7 @@ fail() {
4646
     printf "${RED}✗ FAIL${NC} ${TEST_ID}: %s\n" "$1"
4747
     FAILED_TESTS_LIST="${FAILED_TESTS_LIST}  ${TEST_ID}: $1\n"
4848
     if [ -n "$2" ]; then printf "  posix:  %s\n" "$2"; fi
49
-    if [ -n "$3" ]; then printf "  fortsh: %s\n" "$3"; fi
49
+    if [ -n "$3" ]; then printf "  shell: %s\n" "$3"; fi
5050
     FAILED=$((FAILED + 1))
5151
 }
5252
 
@@ -56,14 +56,14 @@ section() {
5656
     printf "\n${BLUE}==========================================\n%s\n==========================================${NC}\n" "$1"
5757
 }
5858
 
59
-normalize_output() { sed -e 's|^[^ ]*bash: |sh: |' -e 's|^[^ ]*fortsh: |sh: |' -e 's/line [0-9]*: //'; }
59
+normalize_output() { sed -e 's|^[^ ]*/[a-z]*sh[0-9]*: |sh: |' -e 's|^[a-z]*sh[0-9]*: |sh: |' -e 's/line [0-9]*: //'; }
6060
 
6161
 compare_posix_output() {
6262
     test_name="$1"; command="$2"
6363
     posix_out=$("$BASH_REF" -c "$command" 2>&1 | normalize_output)
64
-    fortsh_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
65
-    if [ "$posix_out" = "$fortsh_out" ]; then pass "$test_name"
66
-    else fail "$test_name" "$posix_out" "$fortsh_out"; fi
64
+    shell_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
65
+    if [ "$posix_out" = "$shell_out" ]; then pass "$test_name"
66
+    else fail "$test_name" "$posix_out" "$shell_out"; fi
6767
 }
6868
 
6969
 # ============================================================================
suites/posix/posix_gaps_redirect.shmodified
@@ -27,7 +27,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2727
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2828
 BASH_REF="${BASH_REF:-bash}"
2929
 
30
-# Check if fortsh exists
30
+# Check if shell binary exists
3131
 if [ ! -x "$SHELL_BIN" ]; then
3232
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3333
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -46,7 +46,7 @@ fail() {
4646
     printf "${RED}✗ FAIL${NC} ${TEST_ID}: %s\n" "$1"
4747
     FAILED_TESTS_LIST="${FAILED_TESTS_LIST}  ${TEST_ID}: $1\n"
4848
     if [ -n "$2" ]; then printf "  posix:  %s\n" "$2"; fi
49
-    if [ -n "$3" ]; then printf "  fortsh: %s\n" "$3"; fi
49
+    if [ -n "$3" ]; then printf "  shell: %s\n" "$3"; fi
5050
     FAILED=$((FAILED + 1))
5151
 }
5252
 
@@ -56,22 +56,22 @@ section() {
5656
     printf "\n${BLUE}==========================================\n%s\n==========================================${NC}\n" "$1"
5757
 }
5858
 
59
-normalize_output() { sed -e 's|^[^ ]*bash: |sh: |' -e 's|^[^ ]*fortsh: |sh: |' -e 's/line [0-9]*: //'; }
59
+normalize_output() { sed -e 's|^[^ ]*/[a-z]*sh[0-9]*: |sh: |' -e 's|^[a-z]*sh[0-9]*: |sh: |' -e 's/line [0-9]*: //'; }
6060
 
6161
 compare_posix_output() {
6262
     test_name="$1"; command="$2"
6363
     posix_out=$("$BASH_REF" -c "$command" 2>&1 | normalize_output)
64
-    fortsh_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
65
-    if [ "$posix_out" = "$fortsh_out" ]; then pass "$test_name"
66
-    else fail "$test_name" "$posix_out" "$fortsh_out"; fi
64
+    shell_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
65
+    if [ "$posix_out" = "$shell_out" ]; then pass "$test_name"
66
+    else fail "$test_name" "$posix_out" "$shell_out"; fi
6767
 }
6868
 
6969
 compare_posix_exit_code() {
7070
     test_name="$1"; command="$2"
7171
     "$BASH_REF" -c "$command" >/dev/null 2>&1; posix_code=$?
72
-    "$SHELL_BIN" -c "$command" >/dev/null 2>&1; fortsh_code=$?
73
-    if [ "$posix_code" = "$fortsh_code" ]; then pass "$test_name"
74
-    else fail "$test_name" "exit $posix_code" "exit $fortsh_code"; fi
72
+    "$SHELL_BIN" -c "$command" >/dev/null 2>&1; shell_code=$?
73
+    if [ "$posix_code" = "$shell_code" ]; then pass "$test_name"
74
+    else fail "$test_name" "exit $posix_code" "exit $shell_code"; fi
7575
 }
7676
 
7777
 # ============================================================================
suites/posix/posix_gaps_special.shmodified
@@ -28,7 +28,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
2828
 SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
2929
 BASH_REF="${BASH_REF:-bash}"
3030
 
31
-# Check if fortsh exists
31
+# Check if shell binary exists
3232
 if [ ! -x "$SHELL_BIN" ]; then
3333
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
3434
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -47,7 +47,7 @@ fail() {
4747
     printf "${RED}✗ FAIL${NC} ${TEST_ID}: %s\n" "$1"
4848
     FAILED_TESTS_LIST="${FAILED_TESTS_LIST}  ${TEST_ID}: $1\n"
4949
     if [ -n "$2" ]; then printf "  posix:  %s\n" "$2"; fi
50
-    if [ -n "$3" ]; then printf "  fortsh: %s\n" "$3"; fi
50
+    if [ -n "$3" ]; then printf "  shell: %s\n" "$3"; fi
5151
     FAILED=$((FAILED + 1))
5252
 }
5353
 
@@ -57,19 +57,19 @@ section() {
5757
     printf "\n${BLUE}==========================================\n%s\n==========================================${NC}\n" "$1"
5858
 }
5959
 
60
-normalize_output() { sed -e 's|^[^ ]*bash: |sh: |' -e 's|^[^ ]*fortsh: |sh: |' -e 's/line [0-9]*: //'; }
60
+normalize_output() { sed -e 's|^[^ ]*/[a-z]*sh[0-9]*: |sh: |' -e 's|^[a-z]*sh[0-9]*: |sh: |' -e 's/line [0-9]*: //'; }
6161
 
6262
 compare_posix_output() {
6363
     test_name="$1"; command="$2"
6464
     posix_out=$("$BASH_REF" -c "$command" 2>&1 | normalize_output)
65
-    fortsh_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
66
-    if [ "$posix_out" = "$fortsh_out" ]; then pass "$test_name"
65
+    shell_out=$("$SHELL_BIN" -c "$command" 2>&1 | normalize_output)
66
+    if [ "$posix_out" = "$shell_out" ]; then pass "$test_name"
6767
     else
68
-        fail "$test_name" "$posix_out" "$fortsh_out"
68
+        fail "$test_name" "$posix_out" "$shell_out"
6969
         # Accumulate debug for CI summary
7070
         DEBUG_INFO="${DEBUG_INFO}DEBUG [$test_name]: cmd='$command'\n"
7171
         DEBUG_INFO="${DEBUG_INFO}  bash: '${posix_out}' hex=$(printf '%s' "$posix_out" | od -A x -t x1z | head -1)\n"
72
-        DEBUG_INFO="${DEBUG_INFO}  fortsh: '${fortsh_out}' hex=$(printf '%s' "$fortsh_out" | od -A x -t x1z | head -1)\n"
72
+        DEBUG_INFO="${DEBUG_INFO}  shell: '${shell_out}' hex=$(printf '%s' "$shell_out" | od -A x -t x1z | head -1)\n"
7373
     fi
7474
 }
7575
 
suites/posix/run_posix_tests.shmodified
@@ -2,7 +2,7 @@
22
 # =====================================
33
 # POSIX Compliance Test Runner
44
 # =====================================
5
-# Runs all POSIX compliance test suites for fortsh
5
+# Runs all POSIX compliance test suites for shell
66
 # Automatically detects fortsh binary location
77
 
88
 set -e
suites/test_harness.shmodified
@@ -51,7 +51,7 @@ SHELL_BIN="${SHELL_BIN:?ERROR: SHELL_BIN must be set}"
5151
 # macOS ships bash 3.2 which lacks these; override with BASH_REF=/opt/homebrew/bin/bash
5252
 BASH_REF="${BASH_REF:-bash}"
5353
 
54
-# Check if fortsh exists
54
+# Check if shell binary exists
5555
 if [ ! -x "$SHELL_BIN" ]; then
5656
     printf "${RED}ERROR${NC}: shell binary not found at $SHELL_BIN\n"
5757
     printf "Please set SHELL_BIN or set SHELL_BIN environment variable\n"
@@ -93,10 +93,10 @@ section() {
9393
 
9494
 # Normalize shell name prefixes in error messages for comparison
9595
 normalize_shell_name() {
96
-    printf '%s\n' "$1" | sed -e 's/bash: line [0-9]*: /SHELL: /g' \
97
-                              -e 's/fortsh: line [0-9]*: /SHELL: /g' \
98
-                              -e 's/bash: /SHELL: /g' \
99
-                              -e 's/fortsh: /SHELL: /g'
96
+    printf '%s\n' "$1" | sed -e 's/[a-z]*sh[0-9]*: line [0-9]*: /SHELL: /g' \
97
+                              -e  \
98
+                              -e 's/[a-z]*sh[0-9]*: /SHELL: /g' \
99
+                              -e 's/[a-z]*sh[0-9]*: /SHELL: /g'
100100
 }
101101
 
102102
 # Per-test timeout (seconds) — prevents hanging tests from blocking CI