mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-13 02:17:07 +03:00
b5e7b54c7a
git-svn-id: svn://kolibrios.org@6429 a494cfbc-eb01-0410-851d-a64ba20cac60
16 lines
402 B
Python
16 lines
402 B
Python
import subprocess
|
|
import sys
|
|
import difflib
|
|
|
|
def main():
|
|
reference = subprocess.check_output([sys.argv[1]])
|
|
compare = subprocess.check_output(sys.argv[2:])
|
|
failed = False
|
|
for line in difflib.unified_diff(reference.split('\n'), compare.split('\n'), fromfile='cc', tofile='tcc', lineterm=''):
|
|
failed = True
|
|
print line
|
|
sys.exit(1 if failed else 0)
|
|
|
|
if __name__ == '__main__':
|
|
main()
|