implement #pragma comment(lib,...)
[tinycc.git] / tests / tcctest.py
blob817250f458594afad20771120c935a85a8a94e38
1 import subprocess
2 import sys
3 import difflib
5 def main():
6 reference = subprocess.check_output([sys.argv[1]])
7 compare = subprocess.check_output(sys.argv[2:])
8 failed = False
9 for line in difflib.unified_diff(reference.split('\n'), compare.split('\n'), fromfile='cc', tofile='tcc', lineterm=''):
10 failed = True
11 print line
12 sys.exit(1 if failed else 0)
14 if __name__ == '__main__':
15 main()