aboutsummaryrefslogtreecommitdiff
path: root/new-luxc
diff options
context:
space:
mode:
authorEduardo Julian2017-10-26 17:14:40 -0400
committerEduardo Julian2017-10-26 17:14:40 -0400
commit0f96338dae4b8a9970b052c99954b2fd08a896eb (patch)
tree5c89cfe926d4997a01d416060393c02985f4d3ce /new-luxc
parent68bc19a9cc98b21fee0723a3550347ac982fe6ca (diff)
- Fixed parser tests.
Diffstat (limited to '')
-rw-r--r--new-luxc/test/test/luxc/parser.lux13
1 files changed, 5 insertions, 8 deletions
diff --git a/new-luxc/test/test/luxc/parser.lux b/new-luxc/test/test/luxc/parser.lux
index 0f2fd2dd1..11bd98e6f 100644
--- a/new-luxc/test/test/luxc/parser.lux
+++ b/new-luxc/test/test/luxc/parser.lux
@@ -23,7 +23,7 @@
(r;Random Text)
(do r;Monad<Random>
[#let [digits "0123456789"
- delimiters "()[]{}#;"
+ delimiters "()[]{}#;\""
space "\t\v \n\r\f"
invalid-range (format digits delimiters space)
char-gen (|> r;nat
@@ -74,8 +74,7 @@
composite^))))))
(context: "Lux code parser."
- (<| (seed +15545773516740647407)
- ## (times +100)
+ (<| (times +100)
(do @
[sample code^]
(test "Can parse Lux code."
@@ -112,13 +111,12 @@
))))
(context: "Nat special syntax."
- (<| (seed +8051810494442953019)
- ## (times +100)
+ (<| (times +100)
(do @
[expected (|> r;nat (:: @ map (n.% +1_000)))]
(test "Can parse nat char syntax."
(case (&;parse [default-cursor +0
- (format "#\"" (text;from-code expected) "\"")])
+ (format "#" (%t (text;from-code expected)) "")])
(#e;Success [_ [_ (#;Nat actual)]])
(n.= expected actual)
@@ -149,8 +147,7 @@
(wrap (format "#( " comment " )#")))))))
(context: "Multi-line text & comments."
- (<| (seed +709318929887591337)
- ## (times +100)
+ (<| (times +100)
(do @
[#let [char-gen (|> r;nat (r;filter (function [value]
(not (or (text;space? value)