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
1478648b
Commit
1478648b
authored
Mar 17, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Support ignorable whitespaces output in writer.
parent
80728841
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
2 deletions
+48
-2
mxwriter.c
dlls/msxml3/mxwriter.c
+8
-2
saxreader.c
dlls/msxml3/tests/saxreader.c
+40
-0
No files found.
dlls/msxml3/mxwriter.c
View file @
1478648b
...
...
@@ -1131,8 +1131,14 @@ static HRESULT WINAPI SAXContentHandler_ignorableWhitespace(
int
nchars
)
{
mxwriter
*
This
=
impl_from_ISAXContentHandler
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_wn
(
chars
,
nchars
));
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_wn
(
chars
,
nchars
));
if
(
!
chars
)
return
E_INVALIDARG
;
write_output_buffer
(
This
->
buffer
,
chars
,
nchars
);
return
S_OK
;
}
static
HRESULT
WINAPI
SAXContentHandler_processingInstruction
(
...
...
dlls/msxml3/tests/saxreader.c
View file @
1478648b
...
...
@@ -3182,6 +3182,45 @@ static void test_mxwriter_pi(void)
ok
(
!
lstrcmpW
(
_bstr_
(
"<?target?>
\r\n
"
),
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
VariantClear
(
&
dest
);
ISAXContentHandler_Release
(
content
);
IMXWriter_Release
(
writer
);
}
static
void
test_mxwriter_ignorablespaces
(
void
)
{
static
const
WCHAR
dataW
[]
=
{
'd'
,
'a'
,
't'
,
'a'
,
0
};
ISAXContentHandler
*
content
;
IMXWriter
*
writer
;
VARIANT
dest
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_MXXMLWriter
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMXWriter
,
(
void
**
)
&
writer
);
EXPECT_HR
(
hr
,
S_OK
);
hr
=
IMXWriter_QueryInterface
(
writer
,
&
IID_ISAXContentHandler
,
(
void
**
)
&
content
);
EXPECT_HR
(
hr
,
S_OK
);
hr
=
ISAXContentHandler_ignorableWhitespace
(
content
,
NULL
,
0
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
hr
=
ISAXContentHandler_ignorableWhitespace
(
content
,
dataW
,
0
);
EXPECT_HR
(
hr
,
S_OK
);
hr
=
ISAXContentHandler_ignorableWhitespace
(
content
,
dataW
,
4
);
EXPECT_HR
(
hr
,
S_OK
);
hr
=
ISAXContentHandler_ignorableWhitespace
(
content
,
dataW
,
1
);
EXPECT_HR
(
hr
,
S_OK
);
V_VT
(
&
dest
)
=
VT_EMPTY
;
hr
=
IMXWriter_get_output
(
writer
,
&
dest
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
V_VT
(
&
dest
)
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
dest
));
ok
(
!
lstrcmpW
(
_bstr_
(
"datad"
),
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
VariantClear
(
&
dest
);
ISAXContentHandler_Release
(
content
);
IMXWriter_Release
(
writer
);
}
...
...
@@ -3717,6 +3756,7 @@ START_TEST(saxreader)
test_mxwriter_comment
();
test_mxwriter_cdata
();
test_mxwriter_pi
();
test_mxwriter_ignorablespaces
();
test_mxwriter_dtd
();
test_mxwriter_properties
();
test_mxwriter_flush
();
...
...
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