Skip to content

Commit dc8df35

Browse files
committed
other_test.py: adjusted test_unmatched_file for Windows
1 parent c990c8a commit dc8df35

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

test/cli/other_test.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3841,14 +3841,16 @@ def test_unmatched_file(tmp_path): # #14248 / #14249
38413841
str(test_file)
38423842
]
38433843

3844+
lib_file = 'lib' + os.path.sep + 'test.c'
3845+
38443846
ret, stdout, stderr = cppcheck(args)
38453847
assert stdout == ''
38463848
assert stderr.splitlines() == [
3847-
'lib/test.c:-1:0: information: Unmatched suppression: error [unmatchedSuppression]',
3848-
'lib/test.c:-1:0: information: Unmatched suppression: error2 [unmatchedSuppression]',
3849-
'lib/test.c:-1:0: information: Unmatched suppression: error3 [unmatchedSuppression]',
3850-
'lib/test.c:-1:0: information: Unmatched suppression: error4 [unmatchedSuppression]',
3851-
'lib/test.c:-1:0: information: Unmatched suppression: error5 [unmatchedSuppression]',
3852-
'lib/test.c:-1:0: information: Unmatched suppression: error6 [unmatchedSuppression]'
3849+
f'{lib_file}:-1:0: information: Unmatched suppression: error [unmatchedSuppression]',
3850+
f'{lib_file}:-1:0: information: Unmatched suppression: error2 [unmatchedSuppression]',
3851+
f'{lib_file}:-1:0: information: Unmatched suppression: error3 [unmatchedSuppression]',
3852+
f'{lib_file}:-1:0: information: Unmatched suppression: error4 [unmatchedSuppression]',
3853+
f'{lib_file}:-1:0: information: Unmatched suppression: error5 [unmatchedSuppression]',
3854+
f'{lib_file}:-1:0: information: Unmatched suppression: error6 [unmatchedSuppression]'
38533855
]
38543856
assert ret == 0, stdout

0 commit comments

Comments
 (0)