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
b02ea57e
Commit
b02ea57e
authored
Feb 10, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite/tests: Add a test for short variant of xml declaration.
parent
ce894b9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
reader.c
dlls/xmllite/tests/reader.c
+37
-0
No files found.
dlls/xmllite/tests/reader.c
View file @
b02ea57e
...
...
@@ -55,6 +55,7 @@ static void free_str(WCHAR *str)
}
static
const
char
xmldecl_full
[]
=
"
\xef\xbb\xbf
<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?>
\n
"
;
static
const
char
xmldecl_short
[]
=
"<?xml version=
\"
1.0
\"
?>
\n
"
;
static
IStream
*
create_stream_on_data
(
const
char
*
data
,
int
size
)
{
...
...
@@ -750,6 +751,42 @@ todo_wine {
ok
(
type
==
XmlNodeType_None
,
"got %d
\n
"
,
type
);
}
IStream_Release
(
stream
);
/* test short variant */
stream
=
create_stream_on_data
(
xmldecl_short
,
sizeof
(
xmldecl_short
));
hr
=
IXmlReader_SetInput
(
reader
,
(
IUnknown
*
)
stream
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %08x
\n
"
,
hr
);
type
=
-
1
;
hr
=
IXmlReader_Read
(
reader
,
&
type
);
todo_wine
ok
(
hr
==
S_OK
,
"expected S_OK, got %08x
\n
"
,
hr
);
todo_wine
ok
(
type
==
XmlNodeType_XmlDeclaration
,
"expected XmlDeclaration, got %s
\n
"
,
type_to_str
(
type
));
ok_pos
(
reader
,
1
,
3
,
1
,
21
,
TRUE
);
test_read_state
(
reader
,
XmlReadState_Interactive
,
-
1
,
TRUE
);
hr
=
IXmlReader_GetValue
(
reader
,
&
val
,
NULL
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %08x
\n
"
,
hr
);
todo_wine
ok
(
*
val
==
0
,
"got %s
\n
"
,
wine_dbgstr_w
(
val
));
/* check attributes */
hr
=
IXmlReader_MoveToNextAttribute
(
reader
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %08x
\n
"
,
hr
);
type
=
-
1
;
hr
=
IXmlReader_GetNodeType
(
reader
,
&
type
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %08x
\n
"
,
hr
);
ok
(
type
==
XmlNodeType_Attribute
,
"got %d
\n
"
,
type
);
ok_pos
(
reader
,
1
,
7
,
1
,
21
,
TRUE
);
/* try to move from last attribute */
hr
=
IXmlReader_MoveToNextAttribute
(
reader
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %08x
\n
"
,
hr
);
IStream_Release
(
stream
);
IXmlReader_Release
(
reader
);
}
...
...
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