source: trunk/source/tests/ansi-tests/progn.lsp @ 8991

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

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

File size: 1023 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sat Oct 19 09:33:51 2002
4;;;; Contains: Tests of PROGN
5
6(in-package :cl-test)
7
8(deftest progn.1
9  (progn)
10  nil)
11
12(deftest progn.2
13  (progn 'a)
14  a)
15
16(deftest progn.3
17  (progn 'b 'a)
18  a)
19
20(deftest progn.4
21  (let ((x 0))
22    (values (progn (incf x) x) x))
23  1 1)
24
25(deftest progn.5 (progn (values)))
26
27(deftest progn.6
28  (progn (values 1 2) (values 'a 'b 'c 'd 'e))
29  a b c d e)
30
31(deftest progn.7
32  (let ((x 0))
33    (prog ()
34          (progn (go x) x 'a)
35          (return 'bad)
36          x
37          (return 'good)))
38  good)
39
40;;; No implicit tagbody
41(deftest progn.8
42  (block nil
43    (tagbody
44     (progn
45      (go 10)
46      10
47      (return 'bad))
48     10
49     (return 'good)))
50  good)
51
52;;; Macros are expanded in the appropriate environment
53
54(deftest progn.9
55  (macrolet
56   ((%m (z) z))
57   (progn (expand-in-current-env (%m :good))))
58  :good)
59
60(deftest progn.10
61  (macrolet
62   ((%m (z) z))
63   (progn (expand-in-current-env (%m :bad))
64          (expand-in-current-env (%m :good))))
65  :good)
66
67
Note: See TracBrowser for help on using the repository browser.