projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.7.10.20:
[sbcl.git]
/
tests
/
reader.impure.lisp
diff --git
a/tests/reader.impure.lisp
b/tests/reader.impure.lisp
index
23ccb4c
..
84be1cf
100644
(file)
--- a/
tests/reader.impure.lisp
+++ b/
tests/reader.impure.lisp
@@
-13,14
+13,14
@@
;;;; absolutely no warranty. See the COPYING and CREDITS files for
;;;; more information.
;;;; absolutely no warranty. See the COPYING and CREDITS files for
;;;; more information.
-(in-package :cl-user)
+(load "assertoid.lisp")
+(use-package "ASSERTOID")
;;; Bug 30, involving mistakes in binding the read table, made this
;;; code fail.
(defun read-vector (stream char)
;;; Bug 30, involving mistakes in binding the read table, made this
;;; code fail.
(defun read-vector (stream char)
+ (declare (ignorable char))
(coerce (read-delimited-list #\] stream t) 'vector))
(coerce (read-delimited-list #\] stream t) 'vector))
-(set-syntax-from-char #\[ #\() ; do I really need this? -- MNA 2001-01-05
-(set-syntax-from-char #\] #\)) ; do I really need this? -- MNA 2001-01-05
(set-macro-character #\[ #'read-vector nil)
(set-macro-character #\] (get-macro-character #\)) nil)
(multiple-value-bind (res pos)
(set-macro-character #\[ #'read-vector nil)
(set-macro-character #\] (get-macro-character #\)) nil)
(multiple-value-bind (res pos)
@@
-36,5
+36,10
@@
(assert (equalp res #(#\x)))
(assert (= pos 5)))
(assert (equalp res #(#\x)))
(assert (= pos 5)))
+;;; Bug 51b. (try to throw READER-ERRORs when the reader encounters
+;;; dubious input)
+(assert (raises-error? (read-from-string "1e1000") reader-error))
+(assert (raises-error? (read-from-string "1/0") reader-error))
+
;;; success
(quit :unix-status 104)
;;; success
(quit :unix-status 104)