Since the number of tests in my program is growing, I decided to break the tests into separate files --one file per module. So, for example, I have a file named "misc.scm" with "misc" module defined inside. In the tests/ folder I have a "misc-tests.scm" file.
So in "run.scm" I do something like:
(use test)
(include "misc-tests")
...
(test-exit)
And in "misc-tests.scm" I have something like below:
(use test)
(load "../misc")
(import misc)
(test-group "misc"
...
However when running `chicken-install -test` I get the following error:
Error: (import) during expansion of (import ...) - cannot import
from undefined module: misc
Now if I move the (load) and (import) expressions from "misc-tests" to
"run", everything works fine. What's the logic behind this behaviour of
"include" [1]? I'd appreciate if someone would shed a light on this.
[1] Of course I have already read "include" docs
(http://api.call-cc.org/doc/chicken/special-forms/include) to no avail.
TIA,
--
Bahman Movaqar
http://BahmanM.com - https://twitter.com/bahman__m
https://github.com/bahmanm - https://gist.github.com/bahmanm
PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
