1
0
mirror of synced 2026-05-05 15:44:25 +00:00
Files
Interlisp.medley/internal/test/LANGUAGE/AUTO/CMLREADTABLE-REGRESSION.TEST

49 lines
2.2 KiB
Plaintext

;; Regression tests for the file CMLREADTABLE
(do-test "AR 7475: Nested #+ reading fails"
(let ((eof-value "foo"))
(and (eq eof-value (read-from-string "#+(or symbolics ti lmi)
(progn
(foo)
#+(or symbolics ti)
(bar)
(baz))"
nil eof-value))
(eq eof-value (read-from-string "#-(or symbolics xerox)
(progn
(foo)
#-(or hp lmi ti)
(bar)
(baz))"
nil eof-value))
(eq eof-value (read-from-string "#+(or symbolics ti lmi)
(progn
(foo)
#-(or symbolics lmi)
(bar)
(baz))"
nil eof-value))
(eq eof-value (read-from-string "#-(or symbolics xerox)
(progn
(foo)
#+(or hp lmi ti)
(bar)
(baz))"
nil eof-value)))))
(do-test "AR 7802 - *READ-SUPPRESS* and undefined hash macro characters"
(equal (read-from-string "(foo #+noway #Pnope bar #+noway \"junk\" baz)")
'(foo bar baz)))
(do-test "AR 7608 - #0\a loses"
(and (char= #\a #0\a)
(expect-errors (xcl:simple-error) (read-from-string "#1\\q"))))
(do-test "AR 8160: printing forms containing backquoted vectors"
(flet ((r-p-r ()
(read-from-string (prin1-to-string (read-from-string "`#(:a :b :c)")))))
(and (not (expect-errors xcl:unbound-variable (eval (r-p-r))))
(equalp (eval (r-p-r)) '#(:a :b :c)))
)
)