(.module: [lux #* ["_" test (#+ Test)] [abstract [monad (#+ do)]] [control [concurrency [promise (#+ Promise)]]] [data ["." text]] [math ["." random (#+ Random)]] [world ["." file]]] [// ["@." artifact]] {#program ["." / ["/#" // #_ ["#." artifact]]]}) (def: #export test Test (<| (_.covering /._) (do {! random.monad} [sample @artifact.random home (random.ascii/alpha 5) #let [fs (: (file.System Promise) (file.mock (\ file.default separator)))]] ($_ _.and (_.cover [/.repository /.path] (let [path (/.path fs home sample)] (and (text.starts_with? (/.repository fs home) path) (text.ends_with? (//artifact.path fs sample) path)))) ))))