diff --git a/test/cli/proj-inline-suppress/1.c b/test/cli/proj-inline-suppress/1.c index 440fbf7cf..490765b2d 100644 --- a/test/cli/proj-inline-suppress/1.c +++ b/test/cli/proj-inline-suppress/1.c @@ -1,5 +1 @@ #include <1.h> - -// cppcheck-suppress some_warning_id ; there should be a unmatchedSuppression warning about this -x; - diff --git a/test/cli/proj-inline-suppress/2.c b/test/cli/proj-inline-suppress/2.c new file mode 100644 index 000000000..541b01cb2 --- /dev/null +++ b/test/cli/proj-inline-suppress/2.c @@ -0,0 +1,3 @@ +// cppcheck-suppress some_warning_id ; there should be a unmatchedSuppression warning about this +x; + diff --git a/test/cli/test-inline-suppress.py b/test/cli/test-inline-suppress.py index eab10467b..c94c493af 100644 --- a/test/cli/test-inline-suppress.py +++ b/test/cli/test-inline-suppress.py @@ -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