Commit e7dda4f5 authored by Eckhart Arnold's avatar Eckhart Arnold

dhparser fixed

parent cd69c3fd
......@@ -207,7 +207,7 @@ def create_project(path: str):
create_file('README.md', README_TEMPLATE.format(name=name))
create_file('tst_%s_grammar.py' % name,
GRAMMAR_TEST_TEMPLATE.format(name=name, dhparserdir=dhparserdir))
create_file('example.xml', 'Life is but a walking shadow\n')
create_file('example.dsl', 'Life is but a walking shadow\n')
os.chmod('tst_%s_grammar.py' % name, 0o755)
# The following is left to the user as an exercise
# print('Creating file "%s".' % (name + 'Compiler.py'))
......
......@@ -45,10 +45,11 @@ class TestDHParserCommandLineTool:
def test_dhparser(self):
os.system('python ../dhparser.py testdata/neu >/dev/null')
os.system('python testdata/neu/tst_neu_grammar.py >/dev/null')
os.system('python testdata/neu/neuCompiler.py testdata/neu/example.xml >testdata/neu/example.xml')
os.system('python testdata/neu/neuCompiler.py testdata/neu/example.dsl '
'>testdata/neu/example.xml')
with open('testdata/neu/example.xml', 'r', encoding='utf-8') as f:
xml = f.read()
assert xml.find('<document>') >= 0
assert xml.find('<document>') >= 0, xml
if __name__ == "__main__":
from DHParser.testing import runner
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment