Problem with 'test-group-with-cleanup' documentation. Mathieu Lirzin (04 Aug 2016 16:04 UTC)
Re: Problem with 'test-group-with-cleanup' documentation. Arthur A. Gleckler (04 Aug 2016 17:25 UTC)
Re: Problem with 'test-group-with-cleanup' documentation. Per Bothner (09 Aug 2016 14:40 UTC)
Re: Problem with 'test-group-with-cleanup' documentation. Marc Nieper-Wißkirchen (09 Aug 2016 14:49 UTC)

Problem with 'test-group-with-cleanup' documentation. Mathieu Lirzin 04 Aug 2016 14:26 UTC

Hello,

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?

Thanks.

--
Mathieu Lirzin