From 0f6567496d90e08d6df6fcf5dfcee63603714605 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 19 Apr 2019 20:18:02 -0400 Subject: Moved the XML parser under "lux/control/parser/". --- stdlib/source/test/lux/data/format/xml.lux | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'stdlib/source/test') 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))))) -- cgit v1.2.3