Dears,

I am learning Guile and I like to do so by creating a toy app (it leads my experiments). Emacs and Geiser bring together a funny way to build software incrementaly. As my software becomes bigger, I appreciate haviing a non-regression test harness to see if I broke old features by adding new features or by just cleaning the code haha.

I am using the SRFI-64 to build that test harness for my software. I evaluate the (load "main-test.scm") expression in the REPL to run my tests. By doing so, I can see the number of "expected passes" incrementing over the last runs.

xxxxxx@(guile-user)> (load "main-test.scm")
%%%% Starting test main
# of expected passes 2
xxxxxx@(guile-user)> (load "main-test.scm")
%%%% Starting test main
# of expected passes 4
xxxxxx@(guile-user)> (load "main-test.scm")
%%%% Starting test main
# of expected passes 6

I would like to have this behavior :

xxxxxx@(guile-user)> (load "main-test.scm")
%%%% Starting test main
# of expected passes 2
xxxxxx@(guile-user)> (load "main-test.scm")
%%%% Starting test main
# of expected passes 2
xxxxxx@(guile-user)> (load "main-test.scm")
%%%% Starting test main
# of expected passes 2

Here is my test-main.scm :

(use-modules (srfi srfi-64))
(module-define! (resolve-module '(srfi srfi-64)) 'test-log-to-file #f)
(use-modules (main))
(test-begin "main")
(test-assert "true"
#t)
(test-assert "false"
(not #f))
(test-end "main")

I tried to use (clear-test(test-result-clear (test-runner-current)) without success...

Hope you can help me with that. I have barely few (no) experience in Scheme/Lisp ... Sorry about that.

Thank you,

Jérémy
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.