X-Git-Url: http://git.subgeniuskitty.com/vvhitespace/.git/blobdiff_plain/6e942bd8524e9393f61a0358a0282b2641f9d3d7..66af3009b12b115d5744460c72f52e37fb6dee09:/vv_test.py?ds=inline diff --git a/vv_test.py b/vv_test.py index 46f5bc9..4a31280 100755 --- a/vv_test.py +++ b/vv_test.py @@ -15,16 +15,25 @@ src_extension = '.pvvs' tests = [ ['0001_push_printchar_exit', 'A'], - ['1001_stack_operations', 'BB'] + ['1001_stack_push', 'A'], + ['1002_stack_dup', 'AA'], + ['1003_stack_swap', 'AB'], + ['1004_stack_drop', 'A'], + ['2001_arithmetic_addition', 'B'], + ['2002_arithmetic_subtraction', 'A'], + ['2003_arithmetic_multiplication', 'B'], + ['2004_arithmetic_division', 'A'], + ['2005_arithmetic_remainder', 'A'], ] for test in tests: + # TODO: Catch stderr 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]: - print(test[0]) + print('\n' + test[0]) else: - print('.', end='') + print('.', end='', flush=True) os.remove(temp_file) print("")