0.7.2.10:
[sbcl.git] / tests / reader.pure.lisp
1 ;;;; tests related to the Lisp reader
2
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
6 ;;;; While most of SBCL is derived from the CMU CL system, the test
7 ;;;; files (like this one) were written from scratch after the fork
8 ;;;; from CMU CL.
9 ;;;; 
10 ;;;; This software is in the public domain and is provided with
11 ;;;; absolutely no warranty. See the COPYING and CREDITS files for
12 ;;;; more information.
13
14 (in-package "CL-USER")
15
16 (assert (equal (symbol-name '#:|fd\sA|) "fdsA"))
17
18 ;;; Prior to sbcl-0.7.2.10, SBCL disobeyed the ANSI requirements on
19 ;;; returning NIL for unset dispatch-macro-character functions (bug
20 ;;; 151, fixed by Alexey Dejenka sbcl-devel "bug 151" 2002-04-12)
21 (assert (not (get-dispatch-macro-character #\# #\{)))
22 (assert (not (get-dispatch-macro-character #\# #\0)))
23 ;;; and we might as well test that we don't have any cross-compilation
24 ;;; shebang residues left...
25 (assert (not (get-dispatch-macro-character #\# #\!)))
26 ;;; also test that all the illegal sharp macro characters are
27 ;;; recognized as being illegal.
28 (loop for char in '(#\Backspace #\Tab #\Newline #\Linefeed
29                     #\Page #\Return #\Space #\) #\<)
30    do (assert (get-dispatch-macro-character #\# char)))
31
32 (assert (not (ignore-errors (get-dispatch-macro-character #\! #\0)
33                             t)))