diff options
Diffstat (limited to 'stdlib/source/test/lux/data')
-rw-r--r-- | stdlib/source/test/lux/data/format/xml.lux | 19 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/text/regex.lux | 12 |
2 files changed, 17 insertions, 14 deletions
diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux index 48ca29d92..0ad940971 100644 --- a/stdlib/source/test/lux/data/format/xml.lux +++ b/stdlib/source/test/lux/data/format/xml.lux @@ -85,28 +85,27 @@ (_.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 (</>.run (p.before </>.ignore + (</>.attr attr)) + node)] (wrap (text@= value output))))) (_.test "Can parse nodes." (E.default #0 (do E.monad - [_ (|> (</>.node tag) - (p.before </>.ignore) - (</>.run node))] + [_ (</>.run (p.before </>.ignore + (</>.node tag)) + node)] (wrap #1)))) (_.test "Can parse children." (E.default #0 (do E.monad - [outputs (|> (</>.children (p.some </>.text)) - (</>.run node))] + [outputs (</>.run (</>.children (p.some </>.text)) node)] (wrap (:: (list.equivalence text.equivalence) = children outputs))))) diff --git a/stdlib/source/test/lux/data/text/regex.lux b/stdlib/source/test/lux/data/text/regex.lux index 3a9fc740d..03f1e2f9c 100644 --- a/stdlib/source/test/lux/data/text/regex.lux +++ b/stdlib/source/test/lux/data/text/regex.lux @@ -21,7 +21,8 @@ (def: (should-pass regex input) (-> (Parser Text) Text Bit) - (|> (<text>.run input regex) + (|> input + (<text>.run regex) (case> (#error.Success parsed) (text@= parsed input) @@ -30,7 +31,8 @@ (def: (text-should-pass test regex input) (-> Text (Parser Text) Text Bit) - (|> (<text>.run input regex) + (|> input + (<text>.run regex) (case> (#error.Success parsed) (text@= test parsed) @@ -39,7 +41,8 @@ (def: (should-fail regex input) (All [a] (-> (Parser a) Text Bit)) - (|> (<text>.run input regex) + (|> input + (<text>.run regex) (case> (#error.Failure _) true @@ -48,7 +51,8 @@ (syntax: (should-check pattern regex input) (macro.with-gensyms [g!message g!_] - (wrap (list (` (|> (<text>.run (~ input) (~ regex)) + (wrap (list (` (|> (~ input) + (<text>.run (~ regex)) (case> (^ (#error.Success (~ pattern))) true |