From accb87eddce90a53ed005d1b2ecdcbf244d52674 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Thu, 21 Apr 2016 10:04:31 -0400 Subject: [PATCH] syntax/parse: add more tests --- pkgs/racket-test/tests/stxparse/select.rkt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkgs/racket-test/tests/stxparse/select.rkt b/pkgs/racket-test/tests/stxparse/select.rkt index a03e91b4a6..47de7f6cba 100644 --- a/pkgs/racket-test/tests/stxparse/select.rkt +++ b/pkgs/racket-test/tests/stxparse/select.rkt @@ -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