fromIcalTest.py
1.7 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/python
""" test harness for converting from .ics to .rdf
$Id: fromIcalTest.py,v 1.10 2006/02/25 08:20:33 connolly Exp $
"""
import os, sys
SWAP=sys.argv[1]
Cases = ('xml2005-ndw',
'tag-bug',
'test-created',
'TestTermin',
'geo1',
'Todos1',
'cal01',
'cal02',
'mtg',
'bus-hrs',
'gkexample',
'openingHours',
'spec01-conf3',
'20030423mtg',
'ISWC-related',
'MovieInfo',
'MozexportAsCalendar',
'Chiefs',
'20030115mtg',
'20030122mtg',
'20030205mtg',
'20030212mtg',
'20030226mtg',
'20030312mtg',
'20030326mtg',
'20030409mtg',
'20030410querymtg',
'20030416geomtg',
'20030423mtg',
'bus-hrs',
'querymeetings',
)
# 'MozMulipleVcalendars',
def main():
try:
os.mkdir(",temp")
except OSError:
pass
passes = 0
for case in Cases:
print
print "==== ", case
os.system(("python fromIcal.py"
+ " --base %s/test/%s"
+ " test/%s.ics >,temp/%s.rdf") %
('http://www.w3.org/2002/12/cal', case, case, case))
fp = os.popen("python %s/cwm.py test/graphCompare.n3 --think --data "
"--with test/%s.rdf ,temp/%s.rdf" % (SWAP, case, case))
for l in fp.readlines():
if ':notIncludes' in l:
print l
if 'Success' in l:
print l
passes += 1
print "=========== %d passes out of %d." % (passes, len(Cases))
if __name__ == '__main__':
main()