Skip to content

Commit d722beb

Browse files
committed
test
1 parent 639c072 commit d722beb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/cli/premium_test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,14 @@ def _get_hash(s:str):
114114
assert hash1 != hash2
115115

116116

117+
def test_misra_py(tmpdir):
118+
# 13831 - do not execute misra.py when --premium=misra-c-2012 is used
119+
test_file = os.path.join(tmpdir, 'test.c')
120+
with open(test_file, 'wt') as f:
121+
f.write('void foo();\n')
122+
123+
exe = __copy_cppcheck_premium(tmpdir)
124+
125+
_, stdout, _ = cppcheck(['--enable=style', '--premium=misra-c-2012', test_file], cppcheck_exe=exe)
126+
assert 'misra.py' not in stdout # Did not find misra.py
127+
assert 'Checking' in stdout

0 commit comments

Comments
 (0)