(tmpdir)
| 75 | |
| 76 | |
| 77 | def test_lib_lookup_ext(tmpdir): |
| 78 | test_file = os.path.join(tmpdir, 'test.c') |
| 79 | with open(test_file, 'wt'): |
| 80 | pass |
| 81 | |
| 82 | exitcode, stdout, stderr, exe = cppcheck_ex(['--debug-lookup=library', '--library=gnu.cfg', test_file]) |
| 83 | exepath = os.path.dirname(exe) |
| 84 | if sys.platform == 'win32': |
| 85 | exepath = exepath.replace('\\', '/') |
| 86 | assert exitcode == 0, stdout if stdout else stderr |
| 87 | lines = __remove_std_lookup_log(stdout.splitlines(), exepath) |
| 88 | assert lines == [ |
| 89 | "looking for library 'gnu.cfg'", |
| 90 | "looking for library '{}/gnu.cfg'".format(exepath), |
| 91 | "looking for library '{}/cfg/gnu.cfg'".format(exepath), |
| 92 | 'Checking {} ...'.format(test_file) |
| 93 | ] |
| 94 | |
| 95 | |
| 96 | def test_lib_lookup_notfound(tmpdir): |
nothing calls this directly
no test coverage detected