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
89a00ec3
Commit
89a00ec3
authored
Jun 24, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3/tests: A test to show difference in XPath and XSLPattern for node position.
parent
dfcaf61d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+35
-0
No files found.
dlls/msxml3/tests/domdoc.c
View file @
89a00ec3
...
...
@@ -2969,6 +2969,8 @@ static void test_XPath(void)
expect_list_and_release
(
list
,
""
);
ole_check
(
IXMLDOMDocument_selectNodes
(
doc
,
_bstr_
(
"//elem[4]"
),
&
list
));
expect_list_and_release
(
list
,
""
);
ole_check
(
IXMLDOMDocument_selectNodes
(
doc
,
_bstr_
(
"root//elem[0]"
),
&
list
));
expect_list_and_release
(
list
,
""
);
/* foo undeclared in document node */
ole_expect
(
IXMLDOMDocument_selectNodes
(
doc
,
_bstr_
(
"root//foo:c"
),
&
list
),
E_FAIL
);
...
...
@@ -5524,6 +5526,38 @@ static void test_document_IObjectSafety(void)
IXMLDOMDocument_Release
(
doc
);
}
static
void
test_XSLPattern
(
void
)
{
IXMLDOMDocument2
*
doc
;
IXMLDOMNodeList
*
list
;
VARIANT_BOOL
b
;
HRESULT
r
;
LONG
len
;
r
=
CoCreateInstance
(
&
CLSID_DOMDocument
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IXMLDOMDocument2
,
(
void
**
)
&
doc
);
ok
(
r
==
S_OK
,
"CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x
\n
"
,
r
);
if
(
r
!=
S_OK
)
return
;
ole_check
(
IXMLDOMDocument2_loadXML
(
doc
,
_bstr_
(
szExampleXML
),
&
b
));
ok
(
b
==
VARIANT_TRUE
,
"failed to load XML string
\n
"
);
/* switch to XPath */
ole_check
(
IXMLDOMDocument2_setProperty
(
doc
,
_bstr_
(
"SelectionLanguage"
),
_variantbstr_
(
"XSLPattern"
)));
/* for XSLPattern start index is 0, for XPath it's 1 */
ole_check
(
IXMLDOMDocument2_selectNodes
(
doc
,
_bstr_
(
"root//elem[0]"
),
&
list
));
len
=
0
;
ole_check
(
IXMLDOMNodeList_get_length
(
list
,
&
len
));
todo_wine
ok
(
len
!=
0
,
"expected filled list
\n
"
);
if
(
len
)
todo_wine
expect_list_and_release
(
list
,
"E1.E2.D1"
);
IXMLDOMDocument2_Release
(
doc
);
free_bstrs
();
}
START_TEST
(
domdoc
)
{
IXMLDOMDocument
*
doc
;
...
...
@@ -5552,6 +5586,7 @@ START_TEST(domdoc)
test_removeNamedItem
();
test_IXMLDOMDocument2
();
test_XPath
();
test_XSLPattern
();
test_cloneNode
();
test_xmlTypes
();
test_nodeTypeTests
();
...
...
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