1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 05:50:26 +02:00

more ecmascript testing

* test-suite/tests/ecmascript.test (eread/1, parse): Also check
  read-ecmascript/1, which uses tokenize/1.
This commit is contained in:
Andy Wingo 2010-11-18 12:26:20 +01:00
parent a608cad27e
commit e92f113a5e

View file

@ -24,12 +24,17 @@
(define (eread str) (define (eread str)
(call-with-input-string str read-ecmascript)) (call-with-input-string str read-ecmascript))
(define (eread/1 str)
(call-with-input-string str read-ecmascript/1))
(define-syntax parse (define-syntax parse
(syntax-rules () (syntax-rules ()
((_ expression expected) ((_ expression expected)
(begin
(pass-if expression (pass-if expression
(equal? expected (eread expression)))))) (equal? expected (eread expression)))
(pass-if expression
(equal? expected (eread/1 expression)))))))
(with-test-prefix "parser" (with-test-prefix "parser"