Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
37ea0073
Commit
37ea0073
authored
May 11, 2007
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
May 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Add tests for XPath queries with namespaces.
parent
b5c1d274
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+31
-0
No files found.
dlls/msxml3/tests/domdoc.c
View file @
37ea0073
...
...
@@ -1460,6 +1460,7 @@ static void test_IXMLDOMDocument2(void)
static
void
test_XPath
()
{
HRESULT
r
;
VARIANT
var
;
VARIANT_BOOL
b
;
IXMLDOMDocument2
*
doc
;
IXMLDOMNode
*
rootNode
;
...
...
@@ -1540,6 +1541,36 @@ static void test_XPath()
ole_check
(
IXMLDOMNode_selectNodes
(
elem1Node
,
_bstr_
(
"//*[name()='foo:c']"
),
&
list
));
expect_list_and_release
(
list
,
"E3.E4.E2.D1"
);
/* it has to be declared in SelectionNamespaces */
todo_wine
ole_check
(
IXMLDOMDocument2_setProperty
(
doc
,
_bstr_
(
"SelectionNamespaces"
),
_variantbstr_
(
"xmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'"
)));
/* now the namespace can be used */
todo_wine
ole_check
(
IXMLDOMDocument_selectNodes
(
doc
,
_bstr_
(
"root//test:c"
),
&
list
));
todo_wine
expect_list_and_release
(
list
,
"E3.E3.E2.D1 E3.E4.E2.D1"
);
todo_wine
ole_check
(
IXMLDOMNode_selectNodes
(
rootNode
,
_bstr_
(
".//test:c"
),
&
list
));
todo_wine
expect_list_and_release
(
list
,
"E3.E3.E2.D1 E3.E4.E2.D1"
);
todo_wine
ole_check
(
IXMLDOMNode_selectNodes
(
elem1Node
,
_bstr_
(
"//test:c"
),
&
list
));
todo_wine
expect_list_and_release
(
list
,
"E3.E3.E2.D1 E3.E4.E2.D1"
);
todo_wine
ole_check
(
IXMLDOMNode_selectNodes
(
elem1Node
,
_bstr_
(
".//test:x"
),
&
list
));
todo_wine
expect_list_and_release
(
list
,
"E5.E1.E4.E1.E2.D1"
);
/* SelectionNamespaces syntax error - the namespaces doesn't work anymore but the value is stored */
ole_expect
(
IXMLDOMDocument2_setProperty
(
doc
,
_bstr_
(
"SelectionNamespaces"
),
_variantbstr_
(
"xmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29' xmlns:foo=###"
)),
E_FAIL
);
ole_expect
(
IXMLDOMDocument_selectNodes
(
doc
,
_bstr_
(
"root//foo:c"
),
&
list
),
E_FAIL
);
todo_wine
ole_check
(
IXMLDOMDocument2_getProperty
(
doc
,
_bstr_
(
"SelectionNamespaces"
),
&
var
));
todo_wine
expect_eq
(
V_VT
(
&
var
),
VT_BSTR
,
int
,
"%x"
);
if
(
V_VT
(
&
var
)
==
VT_BSTR
)
expect_bstr_eq_and_free
(
V_BSTR
(
&
var
),
"xmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29' xmlns:foo=###"
);
/* extra attributes - same thing*/
ole_expect
(
IXMLDOMDocument2_setProperty
(
doc
,
_bstr_
(
"SelectionNamespaces"
),
_variantbstr_
(
"xmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29' param='test'"
)),
E_FAIL
);
ole_expect
(
IXMLDOMDocument_selectNodes
(
doc
,
_bstr_
(
"root//foo:c"
),
&
list
),
E_FAIL
);
IXMLDOMNode_Release
(
rootNode
);
IXMLDOMNode_Release
(
elem1Node
);
IXMLDOMDocument_Release
(
doc
);
...
...
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