From: Luis Felipe <sirgazil@zoho.com>
To: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>, guile-user@gnu.org
Subject: Re: Help with modules and unit tests
Date: Fri, 8 Dec 2023 14:26:15 +0000 [thread overview]
Message-ID: <0bade10f-65b7-c2ab-a8ea-987ea062fb29@zoho.com> (raw)
In-Reply-To: <CAAQmekf2jxroicFuLSDVxE7PCSn-VnEEXkS-15LZq=tEz1tHiw@mail.gmail.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 1424 bytes --]
Hi Nikolaos,
El 8/12/23 a las 6:59, Nikolaos Chatzikonstantinou escribió:
> Hello guile-user list,
>
> I am trying to figure out modules and unit tests on Guile.
>
> I would like to have a main.scm that prints a variable defined in
> lib.scm and has unit tests in test.scm.
>
> What I thought I had to do was to use
>
> (add-to-load-path (dirname (current-filename)))
>
> This seemed to be the suggestion in 6.16.8 Load Paths of the Guile
> manual. My entire main.scm looks like this:
>
> (define-module (applejack main))
> (add-to-load-path (dirname (current-filename)))
> (use-modules (applejack lib))
> (define-public (main)
> (format #t "Hello from ~a!~%" name))
>
> My lib.scm is:
>
> (define-module (applejack))
> (define-public name "Applejack")
>
> but I get an error, which I believe originates from current-filename
> returning #f. Separately, the test suite in test.scm is just the
> example in SRFI-64, but I don't know how to run it. I am using Emacs
> and geiser-mode. If I run geiser-eval-buffer, I get test output, and
> it promises that there is some more in vec-test.log, but the logfile
> stands empty.
>
> I would appreciate it if some pointers for the workflow of a small
> Guile project along the lines above were given.
Personally, I'm using these
For running tests: https://luis-felipe.gitlab.io/guile-proba/
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2881 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
next prev parent reply other threads:[~2023-12-08 14:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 6:59 Help with modules and unit tests Nikolaos Chatzikonstantinou
2023-12-08 8:57 ` Nikolaos Chatzikonstantinou
2023-12-08 14:26 ` Luis Felipe [this message]
2023-12-08 14:29 ` Luis Felipe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0bade10f-65b7-c2ab-a8ea-987ea062fb29@zoho.com \
--to=sirgazil@zoho.com \
--cc=guile-user@gnu.org \
--cc=nchatz314@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).