(tmpdir)
| 94 | |
| 95 | |
| 96 | def test_lib_lookup_notfound(tmpdir): |
| 97 | test_file = os.path.join(tmpdir, 'test.c') |
| 98 | with open(test_file, 'wt'): |
| 99 | pass |
| 100 | |
| 101 | exitcode, stdout, _, exe = cppcheck_ex(['--debug-lookup=library', '--library=none', test_file]) |
| 102 | exepath = os.path.dirname(exe) |
| 103 | if sys.platform == 'win32': |
| 104 | exepath = exepath.replace('\\', '/') |
| 105 | assert exitcode == 1, stdout |
| 106 | lines = __remove_std_lookup_log(stdout.splitlines(), exepath) |
| 107 | assert lines == [ |
| 108 | # TODO: specify which folder is actually used for lookup here |
| 109 | "looking for library 'none.cfg'", |
| 110 | "looking for library '{}/none.cfg'".format(exepath), |
| 111 | "looking for library '{}/cfg/none.cfg'".format(exepath), |
| 112 | "library not found: 'none'", |
| 113 | "cppcheck: Failed to load library configuration file 'none'. File not found" |
| 114 | ] |
| 115 | |
| 116 | |
| 117 | def test_lib_lookup_notfound_project(tmpdir): # #13938 |
nothing calls this directly
no test coverage detected