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
674fb3c0
Commit
674fb3c0
authored
Nov 05, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Some tests to show that leading spaces are not allowed for xml stream.
parent
9397fb2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
5 deletions
+28
-5
domdoc.c
dlls/msxml3/tests/domdoc.c
+28
-5
No files found.
dlls/msxml3/tests/domdoc.c
View file @
674fb3c0
...
@@ -1737,6 +1737,15 @@ static const char xpath_simple_list[] =
...
@@ -1737,6 +1737,15 @@ static const char xpath_simple_list[] =
" <d/>"
" <d/>"
"</root>"
;
"</root>"
;
static
const
char
*
leading_spaces
[]
=
{
"
\n
<?xml version=
\"
1.0
\"
?><root/>"
,
" <?xml version=
\"
1.0
\"
?><root/>"
,
"
\t
<?xml version=
\"
1.0
\"
?><root/>"
,
"
\r\n
<?xml version=
\"
1.0
\"
?><root/>"
,
"
\r
<?xml version=
\"
1.0
\"
?><root/>"
,
0
};
static
const
WCHAR
szNonExistentFile
[]
=
{
static
const
WCHAR
szNonExistentFile
[]
=
{
'c'
,
':'
,
'\\'
,
'N'
,
'o'
,
'n'
,
'e'
,
'x'
,
'i'
,
's'
,
't'
,
'e'
,
'n'
,
't'
,
'.'
,
'x'
,
'm'
,
'l'
,
0
'c'
,
':'
,
'\\'
,
'N'
,
'o'
,
'n'
,
'e'
,
'x'
,
'i'
,
's'
,
't'
,
'e'
,
'n'
,
't'
,
'.'
,
'x'
,
'm'
,
'l'
,
0
};
};
...
@@ -1999,7 +2008,7 @@ static char *list_to_string(IXMLDOMNodeList *list)
...
@@ -1999,7 +2008,7 @@ static char *list_to_string(IXMLDOMNodeList *list)
static
void
test_domdoc
(
void
)
static
void
test_domdoc
(
void
)
{
{
HRESULT
r
;
HRESULT
r
,
hr
;
IXMLDOMDocument
*
doc
;
IXMLDOMDocument
*
doc
;
IXMLDOMParseError
*
error
;
IXMLDOMParseError
*
error
;
IXMLDOMElement
*
element
=
NULL
;
IXMLDOMElement
*
element
=
NULL
;
...
@@ -2016,6 +2025,7 @@ static void test_domdoc( void )
...
@@ -2016,6 +2025,7 @@ static void test_domdoc( void )
LONG
code
;
LONG
code
;
LONG
nLength
=
0
;
LONG
nLength
=
0
;
WCHAR
buff
[
100
];
WCHAR
buff
[
100
];
const
char
**
ptr
;
doc
=
create_document
(
&
IID_IXMLDOMDocument
);
doc
=
create_document
(
&
IID_IXMLDOMDocument
);
if
(
!
doc
)
return
;
if
(
!
doc
)
return
;
...
@@ -2027,14 +2037,27 @@ if (0)
...
@@ -2027,14 +2037,27 @@ if (0)
}
}
/* try some stupid things */
/* try some stupid things */
r
=
IXMLDOMDocument_loadXML
(
doc
,
NULL
,
NULL
);
h
r
=
IXMLDOMDocument_loadXML
(
doc
,
NULL
,
NULL
);
ok
(
r
==
S_FALSE
,
"loadXML succeeded
\n
"
);
EXPECT_HR
(
hr
,
S_FALSE
);
b
=
VARIANT_TRUE
;
b
=
VARIANT_TRUE
;
r
=
IXMLDOMDocument_loadXML
(
doc
,
NULL
,
&
b
);
h
r
=
IXMLDOMDocument_loadXML
(
doc
,
NULL
,
&
b
);
ok
(
r
==
S_FALSE
,
"loadXML succeeded
\n
"
);
EXPECT_HR
(
hr
,
S_FALSE
);
ok
(
b
==
VARIANT_FALSE
,
"failed to load XML string
\n
"
);
ok
(
b
==
VARIANT_FALSE
,
"failed to load XML string
\n
"
);
/* load document with leading spaces */
ptr
=
leading_spaces
;
while
(
*
ptr
)
{
b
=
VARIANT_TRUE
;
V_VT
(
&
var
)
=
VT_BSTR
;
V_BSTR
(
&
var
)
=
_bstr_
(
*
ptr
);
hr
=
IXMLDOMDocument_load
(
doc
,
var
,
&
b
);
EXPECT_HR
(
hr
,
S_FALSE
);
ok
(
b
==
VARIANT_FALSE
,
"got %x
\n
"
,
b
);
ptr
++
;
}
/* try to load a document from a nonexistent file */
/* try to load a document from a nonexistent file */
b
=
VARIANT_TRUE
;
b
=
VARIANT_TRUE
;
str
=
SysAllocString
(
szNonExistentFile
);
str
=
SysAllocString
(
szNonExistentFile
);
...
...
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