| 248 | |
| 249 | |
| 250 | def test_debug_clang_output(tmp_path): |
| 251 | test_file = tmp_path / 'test.c' |
| 252 | with open(test_file, 'wt') as f: |
| 253 | f.write( |
| 254 | """ |
| 255 | void f() {} |
| 256 | """) |
| 257 | |
| 258 | args = [ |
| 259 | '-q', |
| 260 | '--clang', |
| 261 | '--debug-clang-output', |
| 262 | str(test_file) |
| 263 | ] |
| 264 | |
| 265 | exitcode, stdout, stderr = cppcheck(args) |
| 266 | assert exitcode == 0, stderr if not stdout else stdout |
| 267 | assert stderr == '' |
| 268 | assert stdout.startswith('TranslationUnitDecl'), stdout |
| 269 | assert stdout.find(str(test_file)) != -1, stdout |
| 270 | |
| 271 | |
| 272 | def test_debug_clang_output_failure_exitcode(tmp_path): |