(tmpdir)
| 260 | |
| 261 | |
| 262 | def test_lib_lookup_absolute_notfound(tmpdir): |
| 263 | test_file = os.path.join(tmpdir, 'test.c') |
| 264 | with open(test_file, 'wt'): |
| 265 | pass |
| 266 | |
| 267 | cfg_file = os.path.join(tmpdir, 'test.cfg') |
| 268 | |
| 269 | exitcode, stdout, _, exe = cppcheck_ex(['--debug-lookup=library', '--library={}'.format(cfg_file), test_file]) |
| 270 | exepath = os.path.dirname(exe) |
| 271 | if sys.platform == 'win32': |
| 272 | exepath = exepath.replace('\\', '/') |
| 273 | assert exitcode == 1, stdout |
| 274 | lines = __remove_std_lookup_log(stdout.splitlines(), exepath) |
| 275 | assert lines == [ |
| 276 | "looking for library '{}'".format(cfg_file), |
| 277 | "library not found: '{}'".format(cfg_file), |
| 278 | "cppcheck: Failed to load library configuration file '{}'. File not found".format(cfg_file) |
| 279 | ] |
| 280 | |
| 281 | |
| 282 | def test_lib_lookup_absolute_noext_notfound(tmpdir): |
nothing calls this directly
no test coverage detected