1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-23 13:00:34 +02:00

* tests/reader.test: New test file.

This commit is contained in:
Jim Blandy 1999-09-11 18:27:57 +00:00
parent 755457ec4a
commit 0c76ebbd1f

View file

@ -0,0 +1,18 @@
;;;; reader.test --- test the Guile parser -*- scheme -*-
;;;; Jim Blandy <jimb@red-bean.com> --- September 1999
(define (try-to-read string)
(pass-if (call-with-output-string (lambda (port)
(display "Try to read " port)
(write string port)))
(catch 'signal
(lambda ()
(call-with-input-string string
(lambda (p) (read p)))
#t)
(lambda args #f))))
(try-to-read "0")
(try-to-read "1++i")
(try-to-read "1+i+i")
(try-to-read "1+e10000i")