(tmp_path, extra_args)
| 2508 | |
| 2509 | # TODO: remove all overrides when fully fixed |
| 2510 | def __test_inline_suppr(tmp_path, extra_args): # #13087 |
| 2511 | test_file = tmp_path / 'test.c' |
| 2512 | with open(test_file, 'wt') as f: |
| 2513 | f.write(""" |
| 2514 | void f() { |
| 2515 | // cppcheck-suppress memleak |
| 2516 | } |
| 2517 | """) |
| 2518 | |
| 2519 | args = [ |
| 2520 | '-q', |
| 2521 | '--template=simple', |
| 2522 | '--enable=information', |
| 2523 | '--inline-suppr', |
| 2524 | str(test_file) |
| 2525 | ] |
| 2526 | |
| 2527 | args += extra_args |
| 2528 | |
| 2529 | exitcode, stdout, stderr, = cppcheck(args) |
| 2530 | assert exitcode == 0, stdout |
| 2531 | assert stdout == '' |
| 2532 | assert stderr.splitlines() == [ |
| 2533 | '{}:4:1: information: Unmatched suppression: memleak [unmatchedSuppression]'.format(test_file) |
| 2534 | ] |
| 2535 | |
| 2536 | |
| 2537 | def test_inline_suppr(tmp_path): |
no test coverage detected