Skip to content

Commit 7cf4c01

Browse files
Apply fix from Per Bothner.
In Per's words: * testing.scm (%test-end): Reset test-runner-current if done. This fixes bug "Loading test source file multiple time without having report incrementing" reported to srfi-64 mailing list. * srfi-64-test.scm: Update due to recent srfi-64 implementation change.
1 parent f604884 commit 7cf4c01

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

srfi-64-test.scm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@
483483
'(("x" "x") ("y") () () ("y") (2 1 0 0 1))
484484
(triv-runner
485485
(lambda ()
486+
(test-begin "a then b")
486487
(test-begin "a")
487488
(test-skip "y")
488489
(test-assert "x" #t) ; PASS
@@ -491,13 +492,15 @@
491492
(test-begin "b")
492493
(test-assert "x" #t) ; PASS
493494
(test-assert "y" #f) ; FAIL
495+
(test-end)
494496
(test-end))))
495497

496498
(test-equal
497499
"6.3.2. Inheriting the Specifier Stack"
498500
'(("x" "x") () () () ("y" "y") (2 0 0 0 2))
499501
(triv-runner
500502
(lambda ()
503+
(test-begin "a then b")
501504
(test-skip "y")
502505
(test-begin "a")
503506
(test-assert "x" #t) ; PASS
@@ -506,6 +509,7 @@
506509
(test-begin "b")
507510
(test-assert "x" #t) ; PASS
508511
(test-assert "y" #f) ; SKIP
512+
(test-end)
509513
(test-end))))
510514

511515
(test-end);6.3
@@ -807,8 +811,8 @@
807811
(test-assert "x" #t)
808812
(test-begin "a")
809813
(test-assert #t)
810-
(test-end)
811-
(test-assert "y" #f))))
814+
(test-assert "y" #f)
815+
(test-end))))
812816

813817
(test-end) ; 8.8
814818

testing.scm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,9 @@
464464
(%test-runner-fail-list! r (car (%test-runner-fail-save r)))
465465
(%test-runner-fail-save! r (cdr (%test-runner-fail-save r)))
466466
(%test-runner-count-list! r (cdr count-list))
467-
(if (null? (test-runner-group-stack r))
468-
((test-runner-on-final r) r)))))
467+
(cond ((null? (test-runner-group-stack r))
468+
((test-runner-on-final r) r)
469+
(test-runner-current #f))))))
469470

470471
(define-syntax test-group
471472
(syntax-rules ()

0 commit comments

Comments
 (0)