diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/program.lux | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/stdlib/source/test/lux/program.lux b/stdlib/source/test/lux/program.lux index 2279a4526..f600adb53 100644 --- a/stdlib/source/test/lux/program.lux +++ b/stdlib/source/test/lux/program.lux @@ -31,43 +31,43 @@ (<| (_.covering /._) (do random.monad [inputs (random.list 5 (random.upper_case 5))] - (_.cover [/.program:] - (let [(open "list#[0]") (list.equivalence text.equivalence)] - (and (with_expansions [<program> (/.program: all_arguments - (io.io all_arguments))] - (let [outcome ((is (-> (List Text) (io.IO Any)) - (..actual_program <program>)) - inputs)] - (same? (is Any inputs) - (io.run! outcome)))) - (with_expansions [<program> (/.program: [arg/0 <cli>.any - arg/1 <cli>.any - arg/2 <cli>.any - arg/3 <cli>.any - arg/4 <cli>.any] - (io.io (list arg/4 arg/3 arg/2 arg/1 arg/0)))] - (let [outcome ((is (-> (List Text) (io.IO Any)) - (..actual_program <program>)) - inputs)] - (list#= (list.reversed inputs) - (as (List Text) (io.run! outcome))))) - (with_expansions [<program> (/.program: [all_arguments (<>.many <cli>.any)] - (io.io all_arguments))] - (let [outcome ((is (-> (List Text) (io.IO Any)) - (..actual_program <program>)) - inputs)] - (list#= inputs - (as (List Text) (io.run! outcome))))) - (with_expansions [<program> (/.program: [arg/0 <cli>.any - arg/1 <cli>.any - arg/2 <cli>.any - arg/3 <cli>.any] - (io.io []))] - (case (try ((is (-> (List Text) (io.IO Any)) - (..actual_program <program>)) - inputs)) - {try.#Success _} - false - - {try.#Failure _} - true)))))))) + (_.coverage [/.program:] + (let [(open "list#[0]") (list.equivalence text.equivalence)] + (and (with_expansions [<program> (/.program: all_arguments + (io.io all_arguments))] + (let [outcome ((is (-> (List Text) (io.IO Any)) + (..actual_program <program>)) + inputs)] + (same? (is Any inputs) + (io.run! outcome)))) + (with_expansions [<program> (/.program: [arg/0 <cli>.any + arg/1 <cli>.any + arg/2 <cli>.any + arg/3 <cli>.any + arg/4 <cli>.any] + (io.io (list arg/4 arg/3 arg/2 arg/1 arg/0)))] + (let [outcome ((is (-> (List Text) (io.IO Any)) + (..actual_program <program>)) + inputs)] + (list#= (list.reversed inputs) + (as (List Text) (io.run! outcome))))) + (with_expansions [<program> (/.program: [all_arguments (<>.many <cli>.any)] + (io.io all_arguments))] + (let [outcome ((is (-> (List Text) (io.IO Any)) + (..actual_program <program>)) + inputs)] + (list#= inputs + (as (List Text) (io.run! outcome))))) + (with_expansions [<program> (/.program: [arg/0 <cli>.any + arg/1 <cli>.any + arg/2 <cli>.any + arg/3 <cli>.any] + (io.io []))] + (case (try ((is (-> (List Text) (io.IO Any)) + (..actual_program <program>)) + inputs)) + {try.#Success _} + false + + {try.#Failure _} + true)))))))) |