aboutsummaryrefslogtreecommitdiff
path: root/new-luxc
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc')
-rw-r--r--new-luxc/test/test/luxc/parser.lux34
1 files changed, 25 insertions, 9 deletions
diff --git a/new-luxc/test/test/luxc/parser.lux b/new-luxc/test/test/luxc/parser.lux
index 11bd98e6f..33a0bc154 100644
--- a/new-luxc/test/test/luxc/parser.lux
+++ b/new-luxc/test/test/luxc/parser.lux
@@ -76,15 +76,31 @@
(context: "Lux code parser."
(<| (times +100)
(do @
- [sample code^]
- (test "Can parse Lux code."
- (case (&;parse [default-cursor +0 (code;to-text sample)])
- (#e;Error error)
- false
-
- (#e;Success [_ parsed])
- (:: code;Eq<Code> = parsed sample))
- ))))
+ [sample code^
+ other code^]
+ ($_ seq
+ (test "Can parse Lux code."
+ (case (&;parse [default-cursor +0 (code;to-text sample)])
+ (#e;Error error)
+ false
+
+ (#e;Success [_ parsed])
+ (:: code;Eq<Code> = parsed sample)))
+ (test "Can parse Lux multiple code nodes."
+ (case (&;parse [default-cursor +0 (format (code;to-text sample) " "
+ (code;to-text other))])
+ (#e;Error error)
+ false
+
+ (#e;Success [remaining =sample])
+ (case (&;parse remaining)
+ (#e;Error error)
+ false
+
+ (#e;Success [_ =other])
+ (and (:: code;Eq<Code> = sample =sample)
+ (:: code;Eq<Code> = other =other)))))
+ ))))
(def: nat-to-frac
(-> Nat Frac)