diff options
Diffstat (limited to 'stdlib/source/test/lux/data/format/tar.lux')
-rw-r--r-- | stdlib/source/test/lux/data/format/tar.lux | 132 |
1 files changed, 66 insertions, 66 deletions
diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux index fedcdd251..8dfe9635d 100644 --- a/stdlib/source/test/lux/data/format/tar.lux +++ b/stdlib/source/test/lux/data/format/tar.lux @@ -174,13 +174,13 @@ tar (|> (row.row (<tag> expected_path)) (format.run /.writer) (<b>.run /.parser))] - (wrap (case (row.to_list tar) - (^ (list (<tag> actual_path))) - (text\= (/.from_path expected_path) - (/.from_path actual_path)) + (in (case (row.to_list tar) + (^ (list (<tag> actual_path))) + (text\= (/.from_path expected_path) + (/.from_path actual_path)) - _ - false))) + _ + false))) (try.default false)))] [/.Symbolic_Link #/.Symbolic_Link] @@ -203,19 +203,19 @@ expected_content])) (format.run /.writer) (<b>.run /.parser))] - (wrap (case (row.to_list tar) - (^ (list (<tag> [actual_path actual_moment actual_mode actual_ownership actual_content]))) - (let [seconds (: (-> Instant Int) - (|>> instant.relative (duration.query duration.second)))] - (and (text\= (/.from_path expected_path) - (/.from_path actual_path)) - (i.= (seconds expected_moment) - (seconds actual_moment)) - (binary\= (/.data expected_content) - (/.data actual_content)))) - - _ - false))) + (in (case (row.to_list tar) + (^ (list (<tag> [actual_path actual_moment actual_mode actual_ownership actual_content]))) + (let [seconds (: (-> Instant Int) + (|>> instant.relative (duration.query duration.second)))] + (and (text\= (/.from_path expected_path) + (/.from_path actual_path)) + (i.= (seconds expected_moment) + (seconds actual_moment)) + (binary\= (/.data expected_content) + (/.data actual_content)))) + + _ + false))) (try.default false)))] [/.Normal #/.Normal] @@ -226,18 +226,18 @@ (Random /.Mode) (do {! random.monad} [] - (random.either (random.either (random.either (wrap /.execute_by_other) - (wrap /.write_by_other)) - (random.either (wrap /.read_by_other) - (wrap /.execute_by_group))) - (random.either (random.either (random.either (wrap /.write_by_group) - (wrap /.read_by_group)) - (random.either (wrap /.execute_by_owner) - (wrap /.write_by_owner))) - (random.either (random.either (wrap /.read_by_owner) - (wrap /.save_text)) - (random.either (wrap /.set_group_id_on_execution) - (wrap /.set_user_id_on_execution))))))) + (random.either (random.either (random.either (in /.execute_by_other) + (in /.write_by_other)) + (random.either (in /.read_by_other) + (in /.execute_by_group))) + (random.either (random.either (random.either (in /.write_by_group) + (in /.read_by_group)) + (random.either (in /.execute_by_owner) + (in /.write_by_owner))) + (random.either (random.either (in /.read_by_owner) + (in /.save_text)) + (random.either (in /.set_group_id_on_execution) + (in /.set_user_id_on_execution))))))) (def: mode Test @@ -261,13 +261,13 @@ content])) (format.run /.writer) (<b>.run /.parser))] - (wrap (case (row.to_list tar) - (^ (list (#/.Normal [_ _ actual_mode _ _]))) - (n.= (/.mode expected_mode) - (/.mode actual_mode)) + (in (case (row.to_list tar) + (^ (list (#/.Normal [_ _ actual_mode _ _]))) + (n.= (/.mode expected_mode) + (/.mode actual_mode)) - _ - false))) + _ + false))) (try.default false))) (~~ (template [<expected_mode>] [(_.cover [<expected_mode>] @@ -284,13 +284,13 @@ content])) (format.run /.writer) (<b>.run /.parser))] - (wrap (case (row.to_list tar) - (^ (list (#/.Normal [_ _ actual_mode _ _]))) - (n.= (/.mode <expected_mode>) - (/.mode actual_mode)) + (in (case (row.to_list tar) + (^ (list (#/.Normal [_ _ actual_mode _ _]))) + (n.= (/.mode <expected_mode>) + (/.mode actual_mode)) - _ - false))) + _ + false))) (try.default false)))] [/.none] @@ -351,15 +351,15 @@ content])) (format.run /.writer) (<b>.run /.parser))] - (wrap (case (row.to_list tar) - (^ (list (#/.Normal [_ _ _ actual_ownership _]))) - (and (text\= (/.from_name expected) - (/.from_name (get@ [#/.user #/.name] actual_ownership))) - (text\= (/.from_name /.anonymous) - (/.from_name (get@ [#/.group #/.name] actual_ownership)))) - - _ - false))) + (in (case (row.to_list tar) + (^ (list (#/.Normal [_ _ _ actual_ownership _]))) + (and (text\= (/.from_name expected) + (/.from_name (get@ [#/.user #/.name] actual_ownership))) + (text\= (/.from_name /.anonymous) + (/.from_name (get@ [#/.group #/.name] actual_ownership)))) + + _ + false))) (try.default false))) (_.cover [/.anonymous /.no_id] (|> (do try.monad @@ -375,19 +375,19 @@ content])) (format.run /.writer) (<b>.run /.parser))] - (wrap (case (row.to_list tar) - (^ (list (#/.Normal [_ _ _ actual_ownership _]))) - (and (text\= (/.from_name /.anonymous) - (/.from_name (get@ [#/.user #/.name] actual_ownership))) - (n.= (/.from_small /.no_id) - (/.from_small (get@ [#/.user #/.id] actual_ownership))) - (text\= (/.from_name /.anonymous) - (/.from_name (get@ [#/.group #/.name] actual_ownership))) - (n.= (/.from_small /.no_id) - (/.from_small (get@ [#/.group #/.id] actual_ownership)))) - - _ - false))) + (in (case (row.to_list tar) + (^ (list (#/.Normal [_ _ _ actual_ownership _]))) + (and (text\= (/.from_name /.anonymous) + (/.from_name (get@ [#/.user #/.name] actual_ownership))) + (n.= (/.from_small /.no_id) + (/.from_small (get@ [#/.user #/.id] actual_ownership))) + (text\= (/.from_name /.anonymous) + (/.from_name (get@ [#/.group #/.name] actual_ownership))) + (n.= (/.from_small /.no_id) + (/.from_small (get@ [#/.group #/.id] actual_ownership)))) + + _ + false))) (try.default false))) )))) @@ -396,7 +396,7 @@ (<| (_.covering /._) (_.for [/.Tar]) (do random.monad - [_ (wrap [])] + [_ (in [])] ($_ _.and (_.cover [/.writer /.parser] (|> row.empty |