On 2015-03-18 17:17, taylanbayi...@gmail.com wrote:
Luis Felipe López Acevedo <felipe.lo...@openmailbox.org> writes:
Hi,
I'm learning to program in Guile Scheme and currently reading and
practicing unit testing with SRFI-64.
How do I make the default test runner in Guile run my whole test
suite? I put all tests in a tests directory (see
<https://bitbucket.org/sirgazil/guilelab/src>).
Thanks,
The way you wrote that file, the test suite will be run when you load
the module. Instead, you could wrap all those top-level forms (sans
the
module declaration) in some kind of 'main' procedure.
Yeah, loading the module is what I currently use to run the tests in one
file, but that won't be convenient when I add more modules and tests. I
thought that maybe there was something like Python's test discovery,
where you run `$ python -m unittest` and it will find all the tests
instead of loading files individually by hand.
Maybe I'll try using a main procedure as you suggest.
And for what it's worth, I have an arguably cleaner implementation of
SRFI-64 here, but it's an R7RS library so it won't work out-of-the-box
on Guile yet: https://gitorious.org/taylan-scheme/srfi/
Taylan
Thanks, Taylan :)
--
Luis Felipe López Acevedo
http://sirgazil.bitbucket.org/