File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -179,6 +179,26 @@ def test_slnx_project_file_not_found(tmpdir):
179179 __test_project_error (tmpdir , "slnx" , content , expected )
180180
181181
182+ def test_slnx_project_file_in_folder_not_found (tmpdir ):
183+ content = '<?xml version="1.0" encoding="UTF-8"?>\r \n ' \
184+ "<Solution>\r \n " \
185+ " <Configurations>\r \n " \
186+ ' <Platform Name="x64" />\r \n ' \
187+ ' <Platform Name="x86" />\r \n ' \
188+ " </Configurations>\r \n " \
189+ ' <Folder Name="/common/">\r \n ' \
190+ ' <Project Path="common/test.vcxproj" />\r \n ' \
191+ ' </Folder>\r \n ' \
192+ "</Solution>\r \n "
193+
194+ expected = "Visual Studio project file is not a valid XML - XML_ERROR_FILE_NOT_FOUND\n " \
195+ "cppcheck: error: failed to load '{}' from Visual Studio solution" .format (os .path .join (tmpdir , "common/test.vcxproj" ))
196+ if sys .platform == "win32" :
197+ expected = expected .replace ('\\ ' , '/' )
198+
199+ __test_project_error (tmpdir , "slnx" , content , expected )
200+
201+
182202def test_vcxproj_no_xml_root (tmpdir ):
183203 content = '<?xml version="1.0" encoding="utf-8"?>'
184204
You can’t perform that action at this time.
0 commit comments