Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Karsten Poeck
ansi-test
Commits
62d95399
Commit
62d95399
authored
Mar 22, 2003
by
pfdietz
Browse files
Various simple restart-bind tests.
parent
319f645d
Changes
1
Hide whitespace changes
Inline
Side-by-side
ansi-tests/restart-bind.lsp
View file @
62d95399
...
...
@@ -29,6 +29,65 @@
(return-from done 'good)))
good)
(deftest restart-bind.6
(restart-bind ())
nil)
(deftest restart-bind.7
(block done
(restart-bind ((foo #'(lambda () (return-from done 'good))))
(invoke-restart 'foo)
'bad))
good)
(deftest restart-bind.8
(block done
(restart-bind ((foo #'(lambda () (return-from done 'good))))
(let ((restart (find-restart 'foo)))
(and (typep restart 'restart)
(invoke-restart restart)))
'bad))
good)
(deftest restart-bind.9
(restart-bind ((foo #'(lambda (a b c) (list c a b))))
(invoke-restart 'foo 1 2 3))
(3 1 2))
(deftest restart-bind.10
(flet ((%f () (invoke-restart 'foo 'x 'y 'z)))
(restart-bind ((foo #'(lambda (a b c) (list c a b))))
(%f)))
(z x y))
(deftest restart-bind.11
(restart-bind
((foo #'(lambda () 'bad)))
(restart-bind
((foo #'(lambda () 'good)))
(invoke-restart 'foo)))
good)
(deftest restart-bind.12
(let ((*x* 'bad))
(declare (special *x*))
(restart-bind
((foo #'(lambda () (declare (special *x*)) *x*)))
(let ((*x* 'good))
(declare (special *x*))
(invoke-restart 'foo))))
good)
(deftest restart-bind.13
(restart-bind
((foo #'(lambda () 'bad)))
(flet ((%f () (invoke-restart 'foo)))
(restart-bind
((foo #'(lambda () 'good)))
(%f))))
good)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment