Skip to content

Commit 6fa5e8b

Browse files
committed
refs #14792 - test/cli/other_test.py: added test
1 parent 96d4a96 commit 6fa5e8b

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

test/cli/other_test.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4749,4 +4749,27 @@ def test_ipc_inline_suppressions(tmp_path):
47494749
stdout_lines = stdout.splitlines()
47504750
stdout_lines.sort()
47514751
assert stdout_lines == stdout_exp
4752+
assert stderr.splitlines() == []
4753+
4754+
4755+
def test_suppression_unmatched_header(tmp_path):
4756+
test_file = tmp_path / 'test.c'
4757+
with open(test_file, "w") as f:
4758+
f.write('#include "inc.h"')
4759+
4760+
inc_file = tmp_path / 'inc.h'
4761+
with open(inc_file, "w") as f:
4762+
f.write('')
4763+
4764+
args = [
4765+
'-q',
4766+
'--template=simple',
4767+
'--enabled=information',
4768+
'--suppress=id:inc.h',
4769+
str(test_file)
4770+
]
4771+
4772+
exitcode, stdout, stderr = cppcheck(args,)
4773+
assert exitcode == 0
4774+
assert stdout == ''
47524775
assert stderr.splitlines() == []

0 commit comments

Comments
 (0)