Use universal newlines for comparison
This commit is contained in:
parent
fbe87c1385
commit
2d9dba76cb
4
wscript
4
wscript
@ -80,7 +80,7 @@ def run_astyle_tests(bld):
|
|||||||
if os.path.isdir('test'):
|
if os.path.isdir('test'):
|
||||||
test_folder = os.path.join(os.getcwd(), 'test')
|
test_folder = os.path.join(os.getcwd(), 'test')
|
||||||
correct_style = os.path.join(test_folder, 'correct_style.cpp')
|
correct_style = os.path.join(test_folder, 'correct_style.cpp')
|
||||||
correct_lines = open(correct_style, 'r').readlines()
|
correct_lines = open(correct_style, 'U').readlines()
|
||||||
|
|
||||||
temp_folder = os.path.join(test_folder, 'temp')
|
temp_folder = os.path.join(test_folder, 'temp')
|
||||||
# Make sure that the temp folder is deleted before copytree
|
# Make sure that the temp folder is deleted before copytree
|
||||||
@ -102,7 +102,7 @@ def run_astyle_tests(bld):
|
|||||||
incorrect_files += 1
|
incorrect_files += 1
|
||||||
print('\nIncorrect formatting: {}'.format(test_file))
|
print('\nIncorrect formatting: {}'.format(test_file))
|
||||||
|
|
||||||
test_lines = open(test_file, 'r').readlines()
|
test_lines = open(test_file, 'U').readlines()
|
||||||
|
|
||||||
diff = difflib.unified_diff(correct_lines, test_lines)
|
diff = difflib.unified_diff(correct_lines, test_lines)
|
||||||
print(''.join(diff))
|
print(''.join(diff))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user