Errata for SRFI 64: A Scheme API for test suites Arthur A. Gleckler 12 Aug 2016 01:53 UTC

I've just published fixes for errata for SRFI 64.  They have
been approved by Per Bothner, the author of SRFI 64, so I
have incorporated them into the public document and added a
note to the Status section.

Several fixes are included:

- First, Mathieu Lirzin reported an unbound variable error
in an example.  Per Bothner provided a fix.  Here's
Mathieu's report:

| In the documentation the following example is given for
| 'test-group-with-cleanup':
|
|   (test-group-with-cleanup "test-file"
|     (define f (open-output-file "log"))
|     (do-a-bunch-of-tests f)
|     (close-output-port f))
|
| However AIUI 'f' is not bound in the cleanup form since
| this example expands to the following:
|
|   (test-group suite-name
|     (dynamic-wind
|       (lambda ()
|          #f)
|       (lambda ()
|         (define f (open-output-file "log"))
|         (do-a-bunch-of-tests f))
|       (lambda ()
|         (close-output-port f))))
|
| Would it be possible to fix the documentation by moving
| the definition of 'f' to the top level?

- Second, Marc Nieper-Wißkirchen reported a bug in the
sample implementation.  Per Bothner provided a fix.  Here's
Marc's report:

| While you are updating SRFI 64, could you also correct one
| thing in the sample implementation?
|
| The first cond-expand's else clause contains an empty
| application (), which is the only thing that makes
| testing.scm non-conforming to R7RS.
|
| For R7RS-compliance, it would be enough to remove the ().

- Finally, Per improved R7RS support in the reference
implementation:

| The attached patch also includes some Kawa-specific
| changes for better r7rs support:
|
|         * testing.scm: Some cleanup so we can use
|         r7rs-style import of this library info a clean
|         r7rs environment, where test-begin is not
|         predefined.  Thus all imported bindings must be
|         bound at compile-time, and not depend on the
|         importing context.
|
| These changes make testing.scm match the version in the
| Kawa source tree.  While the changes are Kawa-specific,
| they might be helpful to other ports.

Thank you, Mathieu, Marc, and Per.

— SRFI Editor