source: trunk/source/tests/ansi-tests/with-simple-restart.lsp @ 8991

Last change on this file since 8991 was 8991, checked in by gz, 12 years ago

Check in the gcl ansi test suite (original, in preparation for making local changes)

File size: 1.1 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sun Mar 23 04:36:52 2003
4;;;; Contains: Tests for WITH-SIMPLE-RESTART
5
6(in-package :cl-test)
7
8(deftest with-simple-restart.1
9  (with-simple-restart (foo ""))
10  nil)
11
12(deftest with-simple-restart.2
13  (with-simple-restart (foo "") (values)))
14
15(deftest with-simple-restart.3
16  (with-simple-restart (foo "") (values 1 2 3 4 5 6 7 8 9 10))
17  1 2 3 4 5 6 7 8 9 10)
18
19(deftest with-simple-restart.4
20  (block nil
21    (tagbody
22     (with-simple-restart
23      (foo "")
24      (go 10)
25      10
26      (return 'bad))
27     10
28     (return 'good)))
29  good)
30
31(deftest with-simple-restart.5
32  (with-simple-restart
33   (foo "zzz")
34   (invoke-restart 'foo))
35  nil t)
36
37(deftest with-simple-restart.6
38  (flet ((%f () (invoke-restart 'foo)))
39    (with-simple-restart
40     (foo "zzz")
41     (%f)))
42  nil t)
43
44(deftest with-simple-restart.7
45  (with-simple-restart
46   (foo (formatter "xxx"))
47   (invoke-restart 'foo))
48  nil t)
49
50(deftest with-simple-restart.8
51  (with-simple-restart
52   (nil "")
53   (invoke-restart (first (compute-restarts))))
54  nil t)
Note: See TracBrowser for help on using the repository browser.