From: "Jérémy Korwin-Zmijowski" <jeremy@korwin-zmijowski.fr>
To: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
Cc: guile-user@gnu.org
Subject: Re: Guile Hacker Handbook - Character sets
Date: Fri, 19 Feb 2021 22:31:48 +0100 [thread overview]
Message-ID: <922a13555263f943bdb09e1979d306787a0abd31.camel@korwin-zmijowski.fr> (raw)
In-Reply-To: <87im6oh6te.fsf@web.de>
Le vendredi 19 février 2021 à 08:09 +0100, Dr. Arne Babenhauserheide a
écrit :
> Hi Jérémy,
Hey Dr. Arne !
> Thank you for your book!
My pleasure :)
> How you’re describing char-sets using a clear use-case looks really
> good!
Thank you, I appreciate that.
> A few comments:
>
> # Try and run the test
>
> here you write “the test fails”, which is slightly unprecise. The
> precise wording would be “the test will fail to run”.
You're right, I'm correcting this right now.
> # Write the minimal …
>
> I wonder why the test-suite returns "passes 1" in the second try
> (with
> undefined password-valid?).
This is something very annoying indeed and it forces you to be very
careful.
I haven't the answer to your question. I assume that SRFI-64 catches
the "Unbound variable" exception somehow and return #f which is the
value the test is coincidently waiting for…
Changing the test to
(test-error "empty password is not valid"
#t
(password-valid? ""))
Will pass :
$ guile -L . char-sets-test.scm
;;; note: source file ./char-sets.scm
;;; newer than compiled /home/jeko/.cache/guile/ccache/3.0-LE-8-
4.4/tmp/char-sets.scm.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling ./char-sets.scm
;;; compiled /home/jeko/.cache/guile/ccache/3.0-LE-8-4.4/tmp/char-
sets.scm.go
%%%% Starting test harness-char-sets (Writing full log to "harness-
char-sets.log")
# of expected passes 1
This indicates an error is raised :
$ cat harness-char-sets.log
%%%% Starting test harness-char-sets
Group begin: harness-char-sets
Test begin:
test-name: "empty password is not valid"
source-file: "char-sets-test.scm"
source-line: 8
source-form: (test-error "empty password is not valid" #t (password-
valid? ""))
Test end:
result-kind: pass
actual-error: (unbound-variable #f "Unbound variable: ~S" (password-
valid?) #f)
expected-error: #t
Group end: harness-char-sets
# of expected passes 1
But I am a bad assumption-er so I should ask to the srfi-64 mailing
list haha. I'm wondering if Guile can return #unspecified ?
> If you want to see the extend to which you can play with macros, you
> can
> have a look at my natural-script-writing entry-point (from enter-
> three-witches):
> https://hg.sr.ht/~arnebab/dryads-wake/browse/enter.w?rev=tip#L349
I will have a look at it, thank you for sharing. I think I will have a
look even to some of your repos. Haha !
> Thank you for your book!
Thank you for reading :-)
Cheers,
Jérémy
prev parent reply other threads:[~2021-02-19 21:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 19:54 Guile Hacker Handbook - Character sets Jérémy Korwin-Zmijowski
2021-02-18 21:53 ` Ricardo Wurmus
2021-02-19 11:15 ` Jérémy Korwin-Zmijowski
2021-02-18 21:54 ` Ricardo Wurmus
2021-02-19 8:10 ` Eli Zaretskii
2021-02-19 10:20 ` Jérémy Korwin-Zmijowski
2021-02-19 12:16 ` Eli Zaretskii
2021-02-18 21:56 ` Zelphir Kaltstahl
2021-02-19 11:23 ` Jérémy Korwin-Zmijowski
2021-02-19 17:26 ` Dr. Arne Babenhauserheide
2021-02-18 23:15 ` divoplade
2021-02-19 0:10 ` John Cowan
2021-02-19 12:59 ` Jérémy Korwin-Zmijowski
2021-02-19 7:09 ` Dr. Arne Babenhauserheide
2021-02-19 21:31 ` Jérémy Korwin-Zmijowski [this message]
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=922a13555263f943bdb09e1979d306787a0abd31.camel@korwin-zmijowski.fr \
--to=jeremy@korwin-zmijowski.fr \
--cc=arne_bab@web.de \
--cc=guile-user@gnu.org \
/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).