You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
1.7 KiB
74 lines
1.7 KiB
#!/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()
|