diff options
author | Eduardo Julian | 2019-05-21 23:40:48 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-05-21 23:40:48 -0400 |
commit | 7406fbf75e7f81b466c02ed07d65e62c86e3230a (patch) | |
tree | 0a667b90ef38dff1f314462c51e94951fbfa69ac /stdlib/source/test/lux/control/parser/cli.lux | |
parent | eb59547eae1753c9aed1ee887e44c825c1b32c05 (diff) |
Fixes & tweaks in tests (and relevant code) due to latest changes in the stdlib.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/control/parser/cli.lux | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/stdlib/source/test/lux/control/parser/cli.lux b/stdlib/source/test/lux/control/parser/cli.lux index a476c97c6..aab4c5158 100644 --- a/stdlib/source/test/lux/control/parser/cli.lux +++ b/stdlib/source/test/lux/control/parser/cli.lux @@ -33,27 +33,27 @@ post-ignore (r.list 5 gen-ignore)] ($_ _.and (_.test "Can read any argument." - (|> (/.run (list yes) /.any) + (|> (/.run /.any (list yes)) (case> (#error.Failure _) #0 (#error.Success arg) (text@= arg yes)))) (_.test "Can test tokens." - (and (|> (/.run (list yes) (/.this yes)) + (and (|> (/.run (/.this yes) (list yes)) (case> (#error.Failure _) #0 (#error.Success _) #1)) - (|> (/.run (list no) (/.this yes)) + (|> (/.run (/.this yes) (list no)) (case> (#error.Failure _) #1 (#error.Success _) #0)))) (_.test "Can use custom token parsers." - (|> (/.run (list yes) (/.parse nat@decode)) + (|> (/.run (/.parse nat@decode) (list yes)) (case> (#error.Failure _) #0 @@ -61,14 +61,14 @@ (text@= (nat@encode parsed) yes)))) (_.test "Can query if there are any more inputs." - (and (|> (/.run (list) /.end) + (and (|> (/.run /.end (list)) (case> (#error.Success []) #1 _ #0)) - (|> (/.run (list yes) (p.not /.end)) + (|> (/.run (p.not /.end) (list yes)) (case> (#error.Success []) #0 _ #1)))) (_.test "Can parse CLI input anywhere." - (|> (/.run (list.concat (list pre-ignore (list yes) post-ignore)) - (|> (/.somewhere (/.this yes)) - (p.before (p.some /.any)))) + (|> (/.run (|> (/.somewhere (/.this yes)) + (p.before (p.some /.any))) + (list.concat (list pre-ignore (list yes) post-ignore))) (case> (#error.Failure _) #0 |