(tmpdir)
| 56 | |
| 57 | |
| 58 | def test_lib_lookup(tmpdir): |
| 59 | test_file = os.path.join(tmpdir, 'test.c') |
| 60 | with open(test_file, 'wt'): |
| 61 | pass |
| 62 | |
| 63 | exitcode, stdout, stderr, exe = cppcheck_ex(['--debug-lookup=library', '--library=gnu', test_file]) |
| 64 | exepath = os.path.dirname(exe) |
| 65 | if sys.platform == 'win32': |
| 66 | exepath = exepath.replace('\\', '/') |
| 67 | assert exitcode == 0, stdout if stdout else stderr |
| 68 | lines = __remove_std_lookup_log(stdout.splitlines(), exepath) |
| 69 | assert lines == [ |
| 70 | "looking for library 'gnu.cfg'", |
| 71 | "looking for library '{}/gnu.cfg'".format(exepath), |
| 72 | "looking for library '{}/cfg/gnu.cfg'".format(exepath), |
| 73 | 'Checking {} ...'.format(test_file) |
| 74 | ] |
| 75 | |
| 76 | |
| 77 | def test_lib_lookup_ext(tmpdir): |
nothing calls this directly
no test coverage detected