source: trunk/source/tests/ansi-tests/copy-readtable.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:  Fri Dec 31 07:15:35 2004
4;;;; Contains: Tests of COPY-READTABLE
5
6(in-package :cl-test)
7
8(deftest copy-readtable.1
9  (notnot-mv (typep (copy-readtable) 'readtable))
10  t)
11
12(deftest copy-readtable.2
13  (notnot-mv (typep (copy-readtable *readtable*) 'readtable))
14  t)
15
16(deftest copy-readtable.3
17  (notnot-mv (typep (copy-readtable *readtable* nil) 'readtable))
18  t)
19
20(deftest copy-readtable.4
21  (let ((rt (copy-readtable *readtable*)))
22    (eql rt *readtable*))
23  nil)
24
25(deftest copy-readtable.5
26  (let ((rt (copy-readtable *readtable* nil)))
27    (eql rt *readtable*))
28  nil)
29
30(deftest copy-readtable.6
31  (let* ((rt (copy-readtable))
32         (rt2 (copy-readtable *readtable* rt)))
33    (notnot (eql rt rt2)))
34  t)
35
36;;; NIL as a readtable designator indicating the standard readtable
37(deftest copy-readtable.7
38  (let ((rt (copy-readtable nil)))
39    (values
40     (notnot rt)
41     (notnot (readtablep rt))
42     (not (eql rt *readtable*))))
43  t t t)
44
45;;; Error tests
46
47(deftest copy-readtable.error.1
48  (signals-error (copy-readtable *readtable* nil nil) program-error)
49  t)
50
51
52
53
54
Note: See TracBrowser for help on using the repository browser.