Skip to content

Commit 1d324a2

Browse files
committed
add test for invalid xml root
1 parent 2517e6f commit 1d324a2

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test/cli/project_test.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ def test_slnx_no_xml_root(tmpdir):
147147
__test_project_error(tmpdir, "slnx", content, expected)
148148

149149

150+
def test_slnx_invalid_xml_root(tmpdir):
151+
content = '<?xml version="1.0" encoding="UTF-8"?>\r\n' \
152+
"<Invalid>\r\n" \
153+
"</Invalid>\r\n"
154+
155+
expected = "Invalid Visual Studio solution file format"
156+
157+
__test_project_error(tmpdir, "slnx", content, expected)
158+
159+
150160
def test_slnx_no_projects(tmpdir):
151161
content = '<?xml version="1.0" encoding="UTF-8"?>\r\n' \
152162
"<Solution>\r\n" \

0 commit comments

Comments
 (0)