(.module: [lux #* ["_" test (#+ Test)] [abstract [monad (#+ do)] [hash (#+ Hash)] {[0 #spec] [/ ["$." equivalence]]}] [control [concurrency [promise (#+ Promise)]]] [data ["." text ("#\." equivalence)]] [math ["." random (#+ Random)]] [world ["." file] [net ["." uri]]]] ["." / #_ ["#." type] ["#." extension]] {#program ["." /]}) (def: #export random (Random /.Artifact) ($_ random.and (random.ascii/alpha 1) (random.ascii/alpha 1) (random.ascii/alpha 1))) (def: #export test Test (<| (_.covering /._) (_.for [/.Group /.Name /.Version /.Artifact] ($_ _.and (_.for [/.equivalence] ($equivalence.spec /.equivalence ..random)) (do random.monad [sample ..random #let [fs (: (file.System Promise) (file.mock (\ file.default separator)))]] (_.cover [/.uri /.path] (|> (/.path fs sample) (text.replace-all uri.separator (\ fs separator)) (text\= (/.uri sample))))) /type.test /extension.test ))))