# run thusly:
# ~/w3ccvs/WWW/2002/12/cal/test$ python ~/w3ccvs/WWW/2000/10/swap/cwm.py \
#    coverage-index-rules.n3 cal-regression.n3 ../icaltzd.rdf \
#   --think >,coverage.n3

@prefix : <cal-regression.n3#>.
@prefix test: <http://www.w3.org/2002/12/cal/caltest.n3#>.
@prefix os: <http://www.w3.org/2000/10/swap/os#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix str: <http://www.w3.org/2000/10/swap/string#>.

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix spec: <http://www.w3.org/2002/12/cal/icalSpec#>.

@prefix cal: <http://www.w3.org/2002/12/cal/icaltzd#>.

{ ?C a test:CalTest; test:shortFileName ?N.
  ([ is os:baseAbsolute of ?N] ".rdf") str:concatenation
   [ is log:uri of ?TF ].
}
 => { ?TF a :TestFile }.

@forAll :P, :CT.

{ ?TF a :TestFile; log:semantics [ log:includes
   {
    [] cal:component [
       a :CT;
       :P []
    ]
 } ].
 :P rdfs:range ?VC; spec:valueType ?VTN.
} => { :testCoverage :row (:CT :P ?VC ?VTN ?TF) }.
