Skip to content
Snippets Groups Projects
Commit aa01ebae authored by pfdietz's avatar pfdietz
Browse files

Tests for invoke-restart-interactively in restart-bind and restart-case.

parent bd688405
No related branches found
No related tags found
No related merge requests found
...@@ -202,9 +202,22 @@ ...@@ -202,9 +202,22 @@
(invoke-restart 'foo))) (invoke-restart 'foo)))
program-error) program-error)
;;; Must still add interactive-function tests (deftest restart-bind.23
(restart-bind
((foo #'(lambda () 'good)))
(invoke-restart-interactively 'foo))
good)
(deftest restart-bind.24
(let ((i 0))
(values
(restart-bind
((foo
#'(lambda (x y z) (list z y x))
:interactive-function (progn (incf i)
#'(lambda () (list 'a 'b 'c)))))
(invoke-restart-interactively 'foo))
i))
(c b a)
1)
...@@ -264,6 +264,30 @@ ...@@ -264,6 +264,30 @@
(foo () 'good)))))) (foo () 'good))))))
good) good)
(deftest restart-case.32
(restart-case
(invoke-restart-interactively 'foo)
(foo () 'good))
good)
(deftest restart-case.33
(restart-case
(invoke-restart-interactively 'foo)
(foo (w x y z)
:interactive (lambda () (list 'a 'b 'c 'd))
(list x w z y)))
(b a d c))
(deftest restart-case.34
(flet ((%f () (list 'a 'b 'c 'd)))
(restart-case
(invoke-restart-interactively 'foo)
(foo (w x y z)
:interactive %f
(list x w z y))))
(b a d c))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment