Permalink
Browse files

fix special t_lex test; result codes.

t_lex needed some special care.
irken now returns a proper result code, expect that.
  • Loading branch information...
samrushing committed Mar 15, 2017
1 parent 9145c2e commit 00efcb0a473e6aeec7cb7a6ac12269c85084a8f0
Showing with 8 additions and 2 deletions.
  1. +8 −2 util/run_tests.py
@@ -50,9 +50,14 @@ def test_t22():
r6 = [ str(x) for x in range (6) ]
assert (lines[1:] == (r6 + r6 + ['#u', '']))
if not os.path.isfile ('parse/lexstep.scm'):
print 'generating parse/lexstep.scm...'
os.system ('(cd parse; python lexer.py)')
def test_t_lex():
# needs to generate parse/lexstep.scm for this test to run.
out = run_test ('t_lex')
assert (out.split('\n')[-4:] == ['{u0 NUMBER "42"}', '{u0 NEWLINE "\\0x0a"}', '"done"', ''])
assert (out.split('\n')[-4:] == ['{u0 whitespace " "}', '{u0 string1 "\\"\\""}', '"done"', ''])
def test_t_vm():
out = run_test ('t_vm', 'vm/tests/t11.byc')
@@ -85,8 +90,9 @@ def test_t_vm():
print 'compiling', path
fail = file.startswith ('f')
code = system ('self/compile %s' % (path,))
print 'code=', code
# need to address the return codes from the compiler...
if code == 3584:
if code == 0:
if fail:
failed.append ((base, 'compile did not fail like expected'))
else:

0 comments on commit 00efcb0

Please sign in to comment.