Thank you all!
*Alexis*, thanks for the explanation.
*Alex*, thanks for that information. I'm going to go investigate that next.
*Dave*, the documentation style is fine, it's sometimes easier to read the
doc right next to the implementation. (-:
However, I'm not quite sure how even your example works. Maybe someone can
check my logic? For instance, you say you want to write tests like
(unless (is os 'windows) (ok test-that-won't-pass-on-windows))
However, `is` seems to return the same value no matter whether the test
passed or failed: it returns the first argument, *irrespective* of the
outcome of the test. So in the above test, the returned value is going to
be that of `os`, which is presumably some non-false value. That means the
guarded test will *never* be run, on any OS.
[Separately, I'm not sure why one would use a testing utility in that
conditional, rather than just a standard conditional, but that's a
different matter.]
In general, this seems to be a property of your underlying function,
`test-more-check`: it returns either the return value sent in through
#:return or the value in the checked position (#:got). But in either case,
this is independent of the success of the test. The only difference is in
the *message*, which is printed as output. I suppose I could parameterize
where it's printed and capture it — but then I have to parse all the
information back out. I'm just not seeing how to compositionally use your
testing primitives?
As an aside, when trying to install the package in a Docker container
running Ubuntu 18.04 with Racket 7.7 installed, I got this error:
raco setup: docs failure: query-exec: unable to open the database file
error code: 14
SQL: "ATTACH $1 AS other"
database: #<path:/root/.racket/7.7/doc/docindex.sqlite>
mode: 'read-only
file permissions: (write read)
which I didn't get on macOS Catalina. The package certainly has a … lot of
stuff! Even links to EDGAR filings. (-:
Thanks,
Shriram
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-users/CAJUf2yS7%2B2OSq899U5%2BQrgZwFNwdowQNdByU4AkxxwK%3Dby5wOQ%40mail.gmail.com.