(tmpdir)
| 115 | |
| 116 | |
| 117 | def test_lib_lookup_notfound_project(tmpdir): # #13938 |
| 118 | project_file, _ = __create_gui_project(tmpdir) |
| 119 | |
| 120 | exitcode, stdout, _, exe = cppcheck_ex(['--debug-lookup=library', '--library=none', '--project={}'.format(project_file)]) |
| 121 | exepath = os.path.dirname(exe) |
| 122 | if sys.platform == 'win32': |
| 123 | exepath = exepath.replace('\\', '/') |
| 124 | assert exitcode == 1, stdout |
| 125 | lines = __remove_std_lookup_log(stdout.splitlines(), exepath) |
| 126 | assert lines == [ |
| 127 | # TODO: needs to look relative to the project first |
| 128 | # TODO: specify which folder is actually used for lookup here |
| 129 | "looking for library 'none.cfg'", |
| 130 | "looking for library '{}/none.cfg'".format(exepath), |
| 131 | "looking for library '{}/cfg/none.cfg'".format(exepath), |
| 132 | "library not found: 'none'", |
| 133 | "cppcheck: Failed to load library configuration file 'none'. File not found" |
| 134 | ] |
| 135 | |
| 136 | |
| 137 | def test_lib_lookup_notfound_compdb(tmpdir): |
nothing calls this directly
no test coverage detected