fortrangoingonforty/fortsh / 8456bce

Browse files

Fix test suite to properly count all passing tests (16/23 pass, 7 skip)

Authored by espadonne
SHA
8456bced5763aae8b7d49b253f201cd6d2c1f4cd
Parents
239f84a
Tree
45d9b80

1 changed file

StatusFile+-
M tests/terminal_integration_tests.sh 18 6
tests/terminal_integration_tests.shmodified
@@ -197,7 +197,9 @@ phase3_tests() {
197197
     test_start "Prompt width: ANSI codes handled"
198198
     # Test that colored prompts work (indirectly tested)
199199
     output=$(run_fortsh 'echo "test"')
200
-    assert_equals "test" "$output"
200
+    if assert_equals "test" "$output"; then
201
+        test_pass
202
+    fi
201203
 
202204
     # Test 3.2: Multi-line prompts supported
203205
     test_start "Prompt width: Multi-line prompts"
@@ -255,12 +257,16 @@ phase5_tests() {
255257
     # Test 5.2: Normal TERM enables features
256258
     test_start "Terminal type: Normal TERM enables features"
257259
     output=$(run_fortsh_with_env "TERM=xterm-256color" 'echo "test"')
258
-    assert_equals "test" "$output"
260
+    if assert_equals "test" "$output"; then
261
+        test_pass
262
+    fi
259263
 
260264
     # Test 5.3: Empty TERM treated as dumb
261265
     test_start "Terminal type: Empty TERM treated as dumb"
262266
     output=$(run_fortsh_with_env "TERM=''" 'echo "test"')
263
-    assert_equals "test" "$output"
267
+    if assert_equals "test" "$output"; then
268
+        test_pass
269
+    fi
264270
 }
265271
 
266272
 # ==============================================================================
@@ -273,12 +279,16 @@ phase6_tests() {
273279
     # Test 6.1: UTF-8 emoji display
274280
     test_start "UTF-8: Emoji display"
275281
     output=$(run_fortsh 'echo "🚀"')
276
-    assert_equals "🚀" "$output"
282
+    if assert_equals "🚀" "$output"; then
283
+        test_pass
284
+    fi
277285
 
278286
     # Test 6.2: UTF-8 CJK characters
279287
     test_start "UTF-8: CJK characters"
280288
     output=$(run_fortsh 'echo "中文"')
281
-    assert_equals "中文" "$output"
289
+    if assert_equals "中文" "$output"; then
290
+        test_pass
291
+    fi
282292
 
283293
     # Test 6.3: True color pass-through
284294
     test_start "True color: 24-bit RGB support"
@@ -313,7 +323,9 @@ integration_tests() {
313323
     # Test I.2: UTF-8 with TERM=dumb (no colors, but UTF-8 works)
314324
     test_start "Integration: UTF-8 in dumb terminal"
315325
     output=$(run_fortsh_with_env "TERM=dumb" 'echo "🚀 中文"')
316
-    assert_equals "🚀 中文" "$output"
326
+    if assert_equals "🚀 中文" "$output"; then
327
+        test_pass
328
+    fi
317329
 
318330
     # Test I.3: Window size in different terminal types
319331
     test_start "Integration: Window size works with TERM=dumb"