46f5bc941f52161a55cf6e9d43741a5c61aa6c69
#!/usr/local/bin/python3.6
# (c) 2019 Aaron Taylor <ataylor at subgeniuskitty dot com>
# Quick and dirty tests for the VVhitespace interpreter.
interpreter_path
= './vvi'
path_to_tests
= './tests/'
['0001_push_printchar_exit', 'A'],
['1001_stack_operations', 'BB']
subprocess
.run([compiler_path
, '-i', path_to_tests
+ test
[0] + src_extension
, '-o', temp_file
])
result
= subprocess
.run([interpreter_path
, '-i', temp_file
], stdout
=subprocess
.PIPE
)
if result
.stdout
.decode('utf-8') != test
[1]: