git @ Cat's Eye Technologies Falderal / 4c0d86e
Make look slightly less like a translation from a Haskell program. Cat's Eye Technologies 11 years ago
1 changed file(s) with 8 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
5252 else:
5353 return 0
5454
55 # load Documents and create Falderal Tests from them
56 documents = []
57 functionalities = {}
58 tests = []
5559 try:
56 return test_documents(options, args)
60 for filename in args:
61 documents.append(Document.load(filename))
62 for document in documents:
63 tests += document.parse_blocks_to_tests(functionalities)
5764 except FalderalSyntaxError as e:
5865 # if options.show_full_exception: do that, else
5966 sys.stderr.write('%s: %s\n' % (e.__class__.__name__, str(e)))
6067 return 1
61
62
63 def test_documents(options, args):
64 # load Falderal documents
65 documents = []
66 for filename in args:
67 documents.append(Document.load(filename))
68
69 # collect functionalities
70 # XXX if any implementations are given in the command line,
71 # we can put them in here.
72 functionalities = {}
73
74 # create Falderal Tests
75 tests = []
76 for document in documents:
77 tests += document.parse_blocks_to_tests(functionalities)
7868
7969 if options.clear_functionalities:
8070 for name in options.clear_functionalities.split(':'):