MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / test_slnx_project_file_not_found

Function test_slnx_project_file_not_found

test/cli/project_test.py:164–179  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

162
163
164def test_slnx_project_file_not_found(tmpdir):
165 content = '<?xml version="1.0" encoding="UTF-8"?>\r\n' \
166 "<Solution>\r\n" \
167 " <Configurations>\r\n" \
168 ' <Platform Name="x64" />\r\n' \
169 ' <Platform Name="x86" />\r\n' \
170 " </Configurations>\r\n" \
171 ' <Project Path="test.vcxproj" />\r\n' \
172 "</Solution>\r\n"
173
174 expected = "Visual Studio project file is not a valid XML - XML_ERROR_FILE_NOT_FOUND\n" \
175 "cppcheck: error: failed to load '{}' from Visual Studio solution".format(os.path.join(tmpdir, "test.vcxproj"))
176 if sys.platform == "win32":
177 expected = expected.replace('\\', '/')
178
179 __test_project_error(tmpdir, "slnx", content, expected)
180
181
182def test_vcxproj_no_xml_root(tmpdir):

Callers

nothing calls this directly

Calls 4

__test_project_errorFunction · 0.85
formatMethod · 0.80
joinMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected