refs #12274 - test/cli/proj2_test.py: made it location-independent / some cleanups
This exposes an issue with the ignored paths not matching when the slashes differ from the given path.
I filed https://trac.cppcheck.net/ticket/12972 about the issue with the mismatching slashes.
There is still an issue that a Windows binary somehow reports an absolute path where a Linux one doesn't:
FAILED proj2_test.py::test_gui_project_loads_absolute_vs_solution_2 - AssertionError: assert 'D:\\a\\cppcheck\\cppcheck\\test\\cli\\proj2\\a\\a.c:1:7: error: Division by zero. [zerodiv]\nx = 3 / 0;\n ^\nD:\\a\\cppcheck\\cppcheck\\test\\cli\\proj2\\b\\b.c:1:7: error: Division by zero. [zerodiv]\nx = 3 / 0;\n ^\n' == 'a\\a.c:1:7: error: Division by zero. [zerodiv]\nx = 3 / 0;\n ^\nb\\b.c:1:7: error: Division by zero. [zerodiv]\nx = 3 / 0;\n ^\n'
- a\a.c:1:7: error: Division by zero. [zerodiv]
+ D:\a\cppcheck\cppcheck\test\cli\proj2\a\a.c:1:7: error: Division by zero. [zerodiv]
x = 3 / 0;
^
- b\b.c:1:7: error: Division by zero. [zerodiv]
+ D:\a\cppcheck\cppcheck\test\cli\proj2\b\b.c:1:7: error: Division by zero. [zerodiv]
x = 3 / 0;
^
There is still an issue that a Windows binary somehow reports an absolute path where a Linux one doesn't:
This appears to be caused by Path::simplifyPath(). realFilename() within simplecpp does nothing on Linux but does a lot on Windows - but only if the file exists and the unit tests for those functions do not generate files.
There is still an issue that a Windows binary somehow reports an absolute path where a Linux one doesn't:
This was an issue with relative paths and a missing path conversation when reading a .cppcheck project compared to what the CLI is doing.
No feedback for two weeks - merging.