fix tests
This commit is contained in:
parent
5d9e106147
commit
51f8726c31
|
@ -35,17 +35,20 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(check-compile-error "#lang br/ragg"
|
;; errors with position are sensitive to length of lang line
|
||||||
|
(define lang-line "#lang br/ragg")
|
||||||
|
|
||||||
|
(check-compile-error (format "~a" lang-line)
|
||||||
"The grammar does not appear to have any rules")
|
"The grammar does not appear to have any rules")
|
||||||
|
|
||||||
(check-compile-error "#lang br/ragg\nfoo"
|
(check-compile-error (format "~a\nfoo" lang-line)
|
||||||
"Error while parsing grammar near: foo [line=2, column=0, position=12]")
|
"Error while parsing grammar near: foo [line=2, column=0, position=15]")
|
||||||
|
|
||||||
(check-compile-error "#lang br/ragg\nnumber : 42"
|
(check-compile-error (format "~a\nnumber : 42" lang-line)
|
||||||
"Error while parsing grammar near: 42 [line=2, column=9, position=21]")
|
"Error while parsing grammar near: 42 [line=2, column=9, position=24]")
|
||||||
|
|
||||||
(check-compile-error "#lang br/ragg\nnumber : 1"
|
(check-compile-error (format "~a\nnumber : 1" lang-line)
|
||||||
"Error while parsing grammar near: 1 [line=2, column=9, position=21]")
|
"Error while parsing grammar near: 1 [line=2, column=9, position=24]")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -127,7 +130,7 @@ EOF
|
||||||
|
|
||||||
(check-compile-error #<<EOF
|
(check-compile-error #<<EOF
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require ragg/examples/simple-line-drawing)
|
(require br/ragg/examples/simple-line-drawing)
|
||||||
(define bad-parser (make-rule-parser crunchy))
|
(define bad-parser (make-rule-parser crunchy))
|
||||||
EOF
|
EOF
|
||||||
"Rule crunchy is not defined in the grammar"
|
"Rule crunchy is not defined in the grammar"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user