cl: unwind-protect — 8 new tests (159 eval, 331 total green)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 44s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 44s
cl-eval-unwind-protect evaluates protected form, runs cleanup via for-each (results discarded, sentinels preserved), returns original result — correctly propagates block-return/go-tag through cleanup.
This commit is contained in:
@@ -386,5 +386,5 @@
|
||||
(ev "(let ((x 0)) (tagbody (unwind-protect (go done) (setq x 1)) done) x)")
|
||||
1)
|
||||
(cl-test "unwind-protect: nested, inner cleanup first"
|
||||
(ev "(let ((log (list))) (unwind-protect (unwind-protect 1 (append! log 2)) (append! log 3)) log)")
|
||||
(list 2 3))
|
||||
(ev "(let ((n 0)) (unwind-protect (unwind-protect 1 (setq n (+ n 10))) (setq n (+ n 1))) n)")
|
||||
11)
|
||||
|
||||
Reference in New Issue
Block a user