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:
parent
755457ec4a
commit
0c76ebbd1f
1 changed files with 18 additions and 0 deletions
18
test-suite/tests/reader.test
Normal file
18
test-suite/tests/reader.test
Normal 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")
|
Loading…
Add table
Add a link
Reference in a new issue