aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
authorEduardo Julian2019-04-19 20:18:02 -0400
committerEduardo Julian2019-04-19 20:18:02 -0400
commit0f6567496d90e08d6df6fcf5dfcee63603714605 (patch)
treec988efebd349b01ac2c28b83d718d797a5b750c2 /stdlib/source/test
parenta4f162c79c70e57c856a0f924d3cbb27ab70babb (diff)
Moved the XML parser under "lux/control/parser/".
Diffstat (limited to 'stdlib/source/test')
-rw-r--r--stdlib/source/test/lux/data/format/xml.lux23
1 files changed, 12 insertions, 11 deletions
diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux
index cf2b10f65..48ca29d92 100644
--- a/stdlib/source/test/lux/data/format/xml.lux
+++ b/stdlib/source/test/lux/data/format/xml.lux
@@ -10,7 +10,8 @@
["$." codec]]}]
[control
pipe
- ["p" parser]]
+ ["p" parser
+ ["</>" xml]]]
[data
["." name]
["E" error]
@@ -84,28 +85,28 @@
(_.test "Can parse text."
(E.default #0
(do E.monad
- [output (/.run (#/.Text text)
- /.text)]
+ [output (</>.run (#/.Text text)
+ </>.text)]
(wrap (text@= text output)))))
(_.test "Can parse attributes."
(E.default #0
(do E.monad
- [output (|> (/.attr attr)
- (p.before /.ignore)
- (/.run node))]
+ [output (|> (</>.attr attr)
+ (p.before </>.ignore)
+ (</>.run node))]
(wrap (text@= value output)))))
(_.test "Can parse nodes."
(E.default #0
(do E.monad
- [_ (|> (/.node tag)
- (p.before /.ignore)
- (/.run node))]
+ [_ (|> (</>.node tag)
+ (p.before </>.ignore)
+ (</>.run node))]
(wrap #1))))
(_.test "Can parse children."
(E.default #0
(do E.monad
- [outputs (|> (/.children (p.some /.text))
- (/.run node))]
+ [outputs (|> (</>.children (p.some </>.text))
+ (</>.run node))]
(wrap (:: (list.equivalence text.equivalence) =
children
outputs)))))