;;;; 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)
+ (declare (ignorable char))
(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)
(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)