(tmpdir)
| 120 | |
| 121 | |
| 122 | def test_sln_project_file_not_found(tmpdir): |
| 123 | content = "\xEF\xBB\xBF\r\n" \ |
| 124 | "Microsoft Visual Studio Solution File, Format Version 12.00\r\n" \ |
| 125 | "# Visual Studio Version 16\r\n" \ |
| 126 | "VisualStudioVersion = 16.0.29020.237\r\n" \ |
| 127 | "MinimumVisualStudioVersion = 10.0.40219.1\r\n" \ |
| 128 | 'Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cli", "cli\\cli.vcxproj", "{35CBDF51-2456-3EC3-99ED-113C30858883}"\r\n' \ |
| 129 | "ProjectSection(ProjectDependencies) = postProject\r\n" \ |
| 130 | "{C183DB5B-AD6C-423D-80CA-1F9549555A1A} = {C183DB5B-AD6C-423D-80CA-1F9549555A1A}\r\n" \ |
| 131 | "EndProjectSection\r\n" \ |
| 132 | "EndProject\r\n" |
| 133 | |
| 134 | expected = "Visual Studio project file is not a valid XML - XML_ERROR_FILE_NOT_FOUND\n" \ |
| 135 | "cppcheck: error: failed to load '{}' from Visual Studio solution".format(os.path.join(tmpdir, "cli/cli.vcxproj")) |
| 136 | if sys.platform == "win32": |
| 137 | expected = expected.replace('\\', '/') |
| 138 | |
| 139 | __test_project_error(tmpdir, "sln", content, expected) |
| 140 | |
| 141 | |
| 142 | def test_slnx_no_xml_root(tmpdir): |
nothing calls this directly
no test coverage detected