Skip to content

Commit b103201

Browse files
jakub-warthurgleckler
authored andcommitted
1 parent f5196f8 commit b103201

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

testing.scm

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,11 @@
298298

299299
(define (%test-begin suite-name count)
300300
(if (not (test-runner-current))
301-
(test-runner-current (test-runner-create)))
301+
(let ((r (test-runner-create)))
302+
(test-runner-current r)
303+
(test-runner-on-final! r
304+
(let ((old-final (test-runner-on-final r)))
305+
(lambda (r) (old-final r) (test-runner-current #f))))))
302306
(let ((runner (test-runner-current)))
303307
((test-runner-on-group-begin runner) runner suite-name count)
304308
(%test-runner-skip-save! runner
@@ -464,9 +468,8 @@
464468
(%test-runner-fail-list! r (car (%test-runner-fail-save r)))
465469
(%test-runner-fail-save! r (cdr (%test-runner-fail-save r)))
466470
(%test-runner-count-list! r (cdr count-list))
467-
(cond ((null? (test-runner-group-stack r))
468-
((test-runner-on-final r) r)
469-
(test-runner-current #f))))))
471+
(if (null? (test-runner-group-stack r))
472+
((test-runner-on-final r) r)))))
470473

471474
(define-syntax test-group
472475
(syntax-rules ()

0 commit comments

Comments
 (0)