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() {
197
     test_start "Prompt width: ANSI codes handled"
197
     test_start "Prompt width: ANSI codes handled"
198
     # Test that colored prompts work (indirectly tested)
198
     # Test that colored prompts work (indirectly tested)
199
     output=$(run_fortsh 'echo "test"')
199
     output=$(run_fortsh 'echo "test"')
200
-    assert_equals "test" "$output"
200
+    if assert_equals "test" "$output"; then
201
+        test_pass
202
+    fi
201
 
203
 
202
     # Test 3.2: Multi-line prompts supported
204
     # Test 3.2: Multi-line prompts supported
203
     test_start "Prompt width: Multi-line prompts"
205
     test_start "Prompt width: Multi-line prompts"
@@ -255,12 +257,16 @@ phase5_tests() {
255
     # Test 5.2: Normal TERM enables features
257
     # Test 5.2: Normal TERM enables features
256
     test_start "Terminal type: Normal TERM enables features"
258
     test_start "Terminal type: Normal TERM enables features"
257
     output=$(run_fortsh_with_env "TERM=xterm-256color" 'echo "test"')
259
     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
259
 
263
 
260
     # Test 5.3: Empty TERM treated as dumb
264
     # Test 5.3: Empty TERM treated as dumb
261
     test_start "Terminal type: Empty TERM treated as dumb"
265
     test_start "Terminal type: Empty TERM treated as dumb"
262
     output=$(run_fortsh_with_env "TERM=''" 'echo "test"')
266
     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
264
 }
270
 }
265
 
271
 
266
 # ==============================================================================
272
 # ==============================================================================
@@ -273,12 +279,16 @@ phase6_tests() {
273
     # Test 6.1: UTF-8 emoji display
279
     # Test 6.1: UTF-8 emoji display
274
     test_start "UTF-8: Emoji display"
280
     test_start "UTF-8: Emoji display"
275
     output=$(run_fortsh 'echo "🚀"')
281
     output=$(run_fortsh 'echo "🚀"')
276
-    assert_equals "🚀" "$output"
282
+    if assert_equals "🚀" "$output"; then
283
+        test_pass
284
+    fi
277
 
285
 
278
     # Test 6.2: UTF-8 CJK characters
286
     # Test 6.2: UTF-8 CJK characters
279
     test_start "UTF-8: CJK characters"
287
     test_start "UTF-8: CJK characters"
280
     output=$(run_fortsh 'echo "中文"')
288
     output=$(run_fortsh 'echo "中文"')
281
-    assert_equals "中文" "$output"
289
+    if assert_equals "中文" "$output"; then
290
+        test_pass
291
+    fi
282
 
292
 
283
     # Test 6.3: True color pass-through
293
     # Test 6.3: True color pass-through
284
     test_start "True color: 24-bit RGB support"
294
     test_start "True color: 24-bit RGB support"
@@ -313,7 +323,9 @@ integration_tests() {
313
     # Test I.2: UTF-8 with TERM=dumb (no colors, but UTF-8 works)
323
     # Test I.2: UTF-8 with TERM=dumb (no colors, but UTF-8 works)
314
     test_start "Integration: UTF-8 in dumb terminal"
324
     test_start "Integration: UTF-8 in dumb terminal"
315
     output=$(run_fortsh_with_env "TERM=dumb" 'echo "🚀 中文"')
325
     output=$(run_fortsh_with_env "TERM=dumb" 'echo "🚀 中文"')
316
-    assert_equals "🚀 中文" "$output"
326
+    if assert_equals "🚀 中文" "$output"; then
327
+        test_pass
328
+    fi
317
 
329
 
318
     # Test I.3: Window size in different terminal types
330
     # Test I.3: Window size in different terminal types
319
     test_start "Integration: Window size works with TERM=dumb"
331
     test_start "Integration: Window size works with TERM=dumb"