test/cli: test unmatchedSuppression handling separately

This commit is contained in:
Daniel Marjamäki 2019-08-17 17:51:48 +02:00
parent 1fdae247b3
commit 2471266f12
3 changed files with 4 additions and 5 deletions

View File

@ -1,5 +1 @@
#include <1.h>
// cppcheck-suppress some_warning_id ; there should be a unmatchedSuppression warning about this
x;

View File

@ -0,0 +1,3 @@
// cppcheck-suppress some_warning_id ; there should be a unmatchedSuppression warning about this
x;

View File

@ -16,6 +16,6 @@ def test2():
assert len(stderr) > 0
def test_unmatched_suppression():
ret, stdout, stderr = cppcheck(['--inline-suppr', '--enable=information', '--error-exitcode=1', 'proj-inline-suppress'])
ret, stdout, stderr = cppcheck(['--inline-suppr', '--enable=information', '--error-exitcode=1', 'proj-inline-suppress/2.c'])
assert ret == 1
assert 'Unmatched suppression: some_warning_id' in stderr