syntax/parse: add more tests

This commit is contained in:
Ryan Culpepper 2016-04-21 10:04:31 -04:00
parent b523c9c13f
commit accb87eddc

View File

@ -154,6 +154,23 @@
(a (~describe "thing" b))
#rx"expected more terms starting with thing$")
;; Post:
(terx "hello"
(~or a:nat (~post a:id))
#rx"expected identifier"
(not #rx"exact-nonnegative-integer"))
(terx "hello"
(~or a:nat (~and (~post (~fail "xyz")) _))
#rx"xyz"
(not #rx"exact-nonnegative-integer"))
(terx ("x")
(~or (a:nat) (~post (a:id)))
#rx"expected identifier"
(not #rx"exact-nonnegative-integer"))
;; ----------------------------------------
;; See "Simplification" from syntax/parse/private/runtime-report