aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/metadata.lux
blob: 5b8b47b002a253c2f563d2607cd3c9c8d207b457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(.module:
  [lux #*
   ["_" test (#+ Test)]
   [abstract
    [monad (#+ do)]]
   [data
    ["." text]]
   [math
    ["." random]]]
  ["." / #_
   ["#." artifact]
   [//
    ["@." artifact]]]
  {#program
   ["." /]})

(def: #export test
  Test
  (<| (_.covering /._)
      ($_ _.and
          (<| (_.for [/.file])
              (do random.monad
                [sample @artifact.random]
                ($_ _.and
                    (_.cover [/.for-project]
                             (text.ends-with? /.file (/.for-project sample)))
                    (_.cover [/.for-version]
                             (text.ends-with? /.file (/.for-version sample)))
                    )))

          /artifact.test
          )))