msxml3: Add test to highlight another difference between XSLPattern and XPath.

This commit is contained in:
Andrey Turkin 2010-07-05 12:27:45 +04:00 committed by Alexandre Julliard
parent 917089a954
commit 1339267ee8
1 changed files with 8 additions and 0 deletions

View File

@ -5589,6 +5589,14 @@ static void test_XSLPattern(void)
/* switch to XPath */
ole_check(IXMLDOMDocument2_setProperty(doc, _bstr_("SelectionLanguage"), _variantbstr_("XSLPattern")));
/* XPath doesn't select elements with non-null default namespace with unqualified selectors, XSLPattern does */
ole_check(IXMLDOMDocument2_selectNodes(doc, _bstr_("//elem/c"), &list));
len = 0;
ole_check(IXMLDOMNodeList_get_length(list, &len));
/* should select <elem><c> and <elem xmlns='...'><c> but not <elem><foo:c> */
todo_wine ok(len == 3, "expected 3 entries in list, got %d\n", len);
IXMLDOMNodeList_Release(list);
/* for XSLPattern start index is 0, for XPath it's 1 */
ole_check(IXMLDOMDocument2_selectNodes(doc, _bstr_("root//elem[0]"), &list));
len = 0;