From dc29bb480e88d0bf7bd032da9b923e12fa79340c Mon Sep 17 00:00:00 2001 From: pfdietz <pfdietz@localhost> Date: Fri, 2 Sep 2005 11:51:54 +0000 Subject: [PATCH] Add a test that DO-ALL-SYMBOLS really does return when a RETURN is executed. --- ansi-tests/do-all-symbols.lsp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ansi-tests/do-all-symbols.lsp b/ansi-tests/do-all-symbols.lsp index 7570aae8..8deac96d 100644 --- a/ansi-tests/do-all-symbols.lsp +++ b/ansi-tests/do-all-symbols.lsp @@ -110,3 +110,15 @@ (do-all-symbols (s x) (declare (special x))))) :good) + +;;; Executing a return actually terminates the loop + +(deftest do-all-symbols.12 + (let ((should-have-returned nil)) + (block done + (do-all-symbols (s :bad1) + (when should-have-returned + (return-from done :bad2)) + (setq should-have-returned t) + (return :good)))) + :good) -- GitLab