[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40434: 27.0.90; Can't run ERT tests for edebugged generator function
From: |
Philipp Stephani |
Subject: |
bug#40434: 27.0.90; Can't run ERT tests for edebugged generator functions |
Date: |
Wed, 10 Jun 2020 13:28:01 +0200 |
Am Sa., 4. Apr. 2020 um 18:57 Uhr schrieb Philipp Stephani
<p.stephani2@gmail.com>:
>
>
> Insert into *scratch*:
>
> (require 'generator)
> (require 'ert)
> (iter-defun foo () (iter-yield 123))
> (ert-deftest foo () (should (equal (iter-next (foo)) 123)))
>
> Evaluate the first two forms. Edebug the third form (C-u C-M-x).
> Evaluate the fourth form. Then run the test using M-x ert RET RET.
> The test will reach `foo', then just hit space to continue. The test
> will then fail with
>
> F foo
> (void-function cps-internal-yield)
I think none of the macros in generator.el should use the 'body' or
'def-body' or 't' debug specifications. Generator functions don't
really have bodies in the edebug sense, as the CPS machinery rewrites
them completely. So probably these should all use 'form' for now,
until edebug grows functionality to instrument such functions.
- bug#40434: 27.0.90; Can't run ERT tests for edebugged generator functions,
Philipp Stephani <=