[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Need help understanding "include" behaviour

From: Bahman Movaqar
Subject: [Chicken-users] Need help understanding "include" behaviour
Date: Sun, 14 Dec 2014 17:55:35 +0330
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

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")

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
( to no avail.


Bahman Movaqar - -
PGP Key ID: 0x6AB5BD68 (

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]