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
36345a6c
Commit
36345a6c
authored
Jul 04, 2013
by
John Chadwick
Committed by
Alexandre Julliard
Jul 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3/tests: Add additional xpath conformance tests.
parent
e1572f9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+60
-0
No files found.
dlls/msxml3/tests/domdoc.c
View file @
36345a6c
...
...
@@ -4361,9 +4361,49 @@ static const selection_ns_t selection_ns_data[] = {
{
NULL
}
};
typedef
struct
{
const
char
*
query
;
const
char
*
list
;
}
xpath_test_t
;
static
const
xpath_test_t
xpath_test
[]
=
{
{
"*/a"
,
"E1.E1.E2.D1 E1.E2.E2.D1 E1.E4.E2.D1"
},
{
"*/b"
,
"E2.E1.E2.D1 E2.E2.E2.D1 E2.E4.E2.D1"
},
{
"*/c"
,
"E3.E1.E2.D1 E3.E2.E2.D1"
},
{
"*/d"
,
"E4.E1.E2.D1 E4.E2.E2.D1 E4.E4.E2.D1"
},
{
"//a"
,
"E1.E1.E2.D1 E1.E2.E2.D1 E1.E4.E2.D1"
},
{
"//b"
,
"E2.E1.E2.D1 E2.E2.E2.D1 E2.E4.E2.D1"
},
{
"//c"
,
"E3.E1.E2.D1 E3.E2.E2.D1"
},
{
"//d"
,
"E4.E1.E2.D1 E4.E2.E2.D1 E4.E4.E2.D1"
},
{
"//c[@type]"
,
"E3.E2.E2.D1"
},
{
"//c[@type]/ancestor::node()[1]"
,
"E2.E2.D1"
},
{
"//c[@type]/ancestor-or-self::node()[1]"
,
"E3.E2.E2.D1"
},
{
"//c[@type]/attribute::node()[1]"
,
"A'type'.E3.E2.E2.D1"
},
{
"//c[@type]/child::node()[1]"
,
"T1.E3.E2.E2.D1"
},
{
"//c[@type]/descendant::node()[1]"
,
"T1.E3.E2.E2.D1"
},
{
"//c[@type]/descendant-or-self::node()[1]"
,
"E3.E2.E2.D1"
},
{
"//c[@type]/following::node()[1]"
,
"E4.E2.E2.D1"
},
{
"//c[@type]/following-sibling::node()[1]"
,
"E4.E2.E2.D1"
},
{
"//c[@type]/parent::node()[1]"
,
"E2.E2.D1"
},
{
"//c[@type]/preceding::node()[1]"
,
"T1.E2.E2.E2.D1"
},
{
"//c[@type]/self::node()[1]"
,
"E3.E2.E2.D1"
},
{
"child::*"
,
"E1.E2.D1 E2.E2.D1 E3.E2.D1 E4.E2.D1"
},
{
"child::node()"
,
"E1.E2.D1 E2.E2.D1 E3.E2.D1 E4.E2.D1"
},
{
"child::text()"
,
""
},
{
"child::*/.."
,
"E2.D1"
},
{
"child::*//@*/.."
,
"E2.E5.E1.E2.D1 E3.E2.E2.D1"
},
{
"self::node()"
,
"E2.D1"
},
{
"ancestor::node()"
,
"D1"
},
{
"elem[c][last()]/a"
,
"E1.E2.E2.D1"
},
{
"ancestor-or-self::node()[1]"
,
"E2.D1"
},
{
"((//a)[1])[last()]"
,
"E1.E1.E2.D1"
},
{
NULL
}
};
static
void
test_XPath
(
void
)
{
const
selection_ns_t
*
ptr
=
selection_ns_data
;
const
xpath_test_t
*
xptest
=
xpath_test
;
VARIANT
var
;
VARIANT_BOOL
b
;
IXMLDOMDocument2
*
doc
;
...
...
@@ -4406,6 +4446,26 @@ static void test_XPath(void)
EXPECT_HR
(
hr
,
S_OK
);
expect_list_and_release
(
list
,
"E2.D1"
);
/* peform xpath tests */
for
(
;
xptest
->
query
;
xptest
++
)
{
char
*
str
;
hr
=
IXMLDOMNode_selectNodes
(
rootNode
,
_bstr_
(
xptest
->
query
),
&
list
);
ok
(
hr
==
S_OK
,
"query evaluation failed for query=%s"
,
xptest
->
query
);
if
(
hr
!=
S_OK
)
continue
;
str
=
list_to_string
(
list
);
ok
(
strcmp
(
str
,
xptest
->
list
)
==
0
,
"query=%s, invalid node list: %s, expected %s
\n
"
,
xptest
->
query
,
str
,
xptest
->
list
);
if
(
list
)
IXMLDOMNodeList_Release
(
list
);
}
if
(
0
)
{
/* namespace:: axis test is disabled until namespace definitions
...
...
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