@@ -205,9 +205,9 @@ def test_lib_lookup_relative_noext_notfound(tmpdir):
205205 assert exitcode == 1 , stdout if stdout else stderr
206206 lines = __remove_std_lookup_log (stdout .splitlines (), exepath )
207207 assert lines == [
208- "looking for library 'config/gnu.cfg '" ,
209- "looking for library '{}/config/gnu.cfg '" .format (exepath ),
210- "looking for library '{}/cfg/config/gnu.cfg '" .format (exepath ),
208+ "looking for library 'config/gnu'" ,
209+ "looking for library '{}/config/gnu'" .format (exepath ),
210+ "looking for library '{}/cfg/config/gnu'" .format (exepath ),
211211 "library not found: 'config/gnu'" ,
212212 "cppcheck: Failed to load library configuration file 'config/gnu'. File not found"
213213 ]
@@ -226,10 +226,9 @@ def test_lib_lookup_relative_noext_trailing_notfound(tmpdir):
226226 assert exitcode == 1 , stdout if stdout else stderr
227227 lines = __remove_std_lookup_log (stdout .splitlines (), exepath )
228228 assert lines == [
229- # TODO: do not append extension
230- "looking for library 'config/gnu/.cfg'" ,
231- "looking for library '{}/config/gnu/.cfg'" .format (exepath ),
232- "looking for library '{}/cfg/config/gnu/.cfg'" .format (exepath ),
229+ "looking for library 'config/gnu/'" ,
230+ "looking for library '{}/config/gnu/'" .format (exepath ),
231+ "looking for library '{}/cfg/config/gnu/'" .format (exepath ),
233232 "library not found: 'config/gnu/'" ,
234233 "cppcheck: Failed to load library configuration file 'config/gnu/'. File not found"
235234 ]
@@ -608,10 +607,10 @@ def test_platform_lookup_relative_noext_notfound(tmpdir):
608607 lines = stdout .splitlines ()
609608 assert lines == [
610609 "looking for platform 'platform/none'" ,
611- "try to load platform file '{}/platform/none.xml ' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platform/none.xml " .format (cwd , cwd ),
612- "try to load platform file '{}/platforms/platform/none.xml ' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platforms/platform/none.xml " .format (cwd , cwd ),
613- "try to load platform file '{}/platform/none.xml ' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platform/none.xml " .format (exepath , exepath ),
614- "try to load platform file '{}/platforms/platform/none.xml ' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platforms/platform/none.xml " .format (exepath , exepath ),
610+ "try to load platform file '{}/platform/none' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platform/none" .format (cwd , cwd ),
611+ "try to load platform file '{}/platforms/platform/none' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platforms/platform/none" .format (cwd , cwd ),
612+ "try to load platform file '{}/platform/none' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platform/none" .format (exepath , exepath ),
613+ "try to load platform file '{}/platforms/platform/none' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platforms/platform/none" .format (exepath , exepath ),
615614 "cppcheck: error: unrecognized platform: 'platform/none'."
616615 ]
617616
@@ -632,11 +631,10 @@ def test_platform_lookup_relative_noext_trailing_notfound(tmpdir):
632631 lines = stdout .splitlines ()
633632 assert lines == [
634633 "looking for platform 'platform/none/'" ,
635- # TODO: should not append extension
636- "try to load platform file '{}/platform/none/.xml' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platform/none/.xml" .format (cwd , cwd ),
637- "try to load platform file '{}/platforms/platform/none/.xml' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platforms/platform/none/.xml" .format (cwd , cwd ),
638- "try to load platform file '{}/platform/none/.xml' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platform/none/.xml" .format (exepath , exepath ),
639- "try to load platform file '{}/platforms/platform/none/.xml' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platforms/platform/none/.xml" .format (exepath , exepath ),
634+ "try to load platform file '{}/platform/none/' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platform/none/" .format (cwd , cwd ),
635+ "try to load platform file '{}/platforms/platform/none/' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platforms/platform/none/" .format (cwd , cwd ),
636+ "try to load platform file '{}/platform/none/' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platform/none/" .format (exepath , exepath ),
637+ "try to load platform file '{}/platforms/platform/none/' ... Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename={}/platforms/platform/none/" .format (exepath , exepath ),
640638 "cppcheck: error: unrecognized platform: 'platform/none/'."
641639 ]
642640
@@ -884,6 +882,7 @@ def test_addon_lookup_relative_notfound(tmpdir):
884882 ]
885883
886884
885+ # FIXME: an addon requires a file extension as we need to differentiate between .py and .json addons
887886def test_addon_lookup_relative_noext_notfound (tmpdir ):
888887 test_file = os .path .join (tmpdir , 'test.c' )
889888 with open (test_file , 'wt' ):
@@ -956,6 +955,7 @@ def test_addon_lookup_absolute_notfound(tmpdir):
956955 ]
957956
958957
958+ # FIXME: an addon requires a file extension as we need to differentiate between .py and .json addons
959959def test_addon_lookup_absolute_noext_notfound (tmpdir ):
960960 test_file = os .path .join (tmpdir , 'test.c' )
961961 with open (test_file , 'wt' ):
0 commit comments