source: trunk/source/tests/ansi-tests/locally.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: 779 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sat Jan  8 06:02:47 2005
4;;;; Contains: Tests of LOCALLY
5
6(in-package :cl-test)
7
8(deftest locally.1
9  (locally)
10  nil)
11
12(deftest locally.2
13  (locally (values)))
14
15(deftest locally.3
16  (locally (values 1 2 3 4))
17  1 2 3 4)
18
19(deftest locally.4
20  (locally (declare) t)
21  t)
22
23(deftest locally.5
24  (locally (declare) (declare) (declare) t)
25  t)
26
27(deftest locally.6
28  (let ((x 'a))
29    (declare (special x))
30    (let ((x 'b))
31      (values
32       x
33       (locally (declare (special x)) x)
34       x)))
35  b a b)
36
37(deftest locally.7
38  (locally (declare))
39  nil)
40
41;;; Macros are expanded in the appropriate environment
42
43(deftest locally.8
44  (macrolet ((%m (z) z))
45            (locally (expand-in-current-env (%m :good))))
46  :good)
Note: See TracBrowser for help on using the repository browser.