Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5de86e12
Commit
5de86e12
authored
Sep 14, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite/writer: Close open tag on WriteProcessingInstruction().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
cd55a674
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
writer.c
dlls/xmllite/tests/writer.c
+25
-0
writer.c
dlls/xmllite/writer.c
+2
-0
No files found.
dlls/xmllite/tests/writer.c
View file @
5de86e12
...
...
@@ -2131,6 +2131,30 @@ static void test_WriteWhitespace(void)
IXmlWriter_Release
(
writer
);
}
static
void
test_WriteProcessingInstruction
(
void
)
{
IXmlWriter
*
writer
;
IStream
*
stream
;
HRESULT
hr
;
hr
=
CreateXmlWriter
(
&
IID_IXmlWriter
,
(
void
**
)
&
writer
,
NULL
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
stream
=
writer_set_output
(
writer
);
hr
=
IXmlWriter_WriteStartElement
(
writer
,
NULL
,
L"w"
,
NULL
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IXmlWriter_WriteProcessingInstruction
(
writer
,
L"pi"
,
L"content"
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IXmlWriter_Flush
(
writer
);
ok
(
hr
==
S_OK
,
"Failed to flush, hr %#lx.
\n
"
,
hr
);
CHECK_OUTPUT
(
stream
,
"<w><?pi content?>"
);
IStream_Release
(
stream
);
IXmlWriter_Release
(
writer
);
}
START_TEST
(
writer
)
{
test_writer_create
();
...
...
@@ -2154,4 +2178,5 @@ START_TEST(writer)
test_WriteString
();
test_WriteDocType
();
test_WriteWhitespace
();
test_WriteProcessingInstruction
();
}
dlls/xmllite/writer.c
View file @
5de86e12
...
...
@@ -1500,6 +1500,8 @@ static HRESULT WINAPI xmlwriter_WriteProcessingInstruction(IXmlWriter *iface, LP
return
WR_E_INVALIDACTION
;
break
;
case
XmlWriterState_ElemStarted
:
writer_close_starttag
(
This
);
break
;
case
XmlWriterState_DocClosed
:
return
WR_E_INVALIDACTION
;
default:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment