(tmpdir)
| 135 | |
| 136 | |
| 137 | def test_lib_lookup_notfound_compdb(tmpdir): |
| 138 | compdb_file, _ = __create_compdb(tmpdir) |
| 139 | |
| 140 | exitcode, stdout, _, exe = cppcheck_ex(['--debug-lookup=library', '--library=none', '--project={}'.format(compdb_file)]) |
| 141 | exepath = os.path.dirname(exe) |
| 142 | if sys.platform == 'win32': |
| 143 | exepath = exepath.replace('\\', '/') |
| 144 | assert exitcode == 1, stdout |
| 145 | lines = __remove_std_lookup_log(stdout.splitlines(), exepath) |
| 146 | assert lines == [ |
| 147 | # TODO: specify which folder is actually used for lookup here |
| 148 | "looking for library 'none.cfg'", |
| 149 | "looking for library '{}/none.cfg'".format(exepath), |
| 150 | "looking for library '{}/cfg/none.cfg'".format(exepath), |
| 151 | "library not found: 'none'", |
| 152 | "cppcheck: Failed to load library configuration file 'none'. File not found" |
| 153 | ] |
| 154 | |
| 155 | |
| 156 | def test_lib_lookup_ext_notfound(tmpdir): |
nothing calls this directly
no test coverage detected