aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/metadata.lux
blob: 0cac022f8af2a9d99b0ee9346b4615ebd8a82ec1 (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
33
34
(.module:
  [lux #*
   ["_" test (#+ Test)]
   [abstract
    [monad (#+ do)]]
   [data
    ["." text]]
   [math
    ["." random]]]
  ["." / #_
   ["#." artifact]
   ["#." snapshot]
   [//
    ["@." artifact]]]
  {#program
   ["." /]})

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

          /artifact.test
          /snapshot.test
          )))