diff options
| -rw-r--r-- | tests/test_xpath_paths.cpp | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/tests/test_xpath_paths.cpp b/tests/test_xpath_paths.cpp index 1f81d62..40bd68c 100644 --- a/tests/test_xpath_paths.cpp +++ b/tests/test_xpath_paths.cpp @@ -522,4 +522,13 @@ TEST_XML(xpath_paths_descendant_filters, "<node><para><para/><para/><para><para/  	CHECK_XPATH_NODESET(doc, STR("//node()[self::para]")) % 3 % 4 % 5 % 6 % 7 % 8;  } +TEST_XML(xpath_paths_descendant_optimize, "<node><para><para/><para/><para><para/></para></para><para/></node>") +{ +	CHECK_XPATH_NODESET(doc, STR("//para")) % 3 % 4 % 5 % 6 % 7 % 8; +	CHECK_XPATH_NODESET(doc, STR("/descendant-or-self::node()/child::para")) % 3 % 4 % 5 % 6 % 7 % 8; +	CHECK_XPATH_NODESET(doc, STR("/descendant-or-self::node()[name()='para']/child::para")) % 4 % 5 % 6 % 7; +	CHECK_XPATH_NODESET(doc, STR("/descendant-or-self::node()[name()='para']/child::para[1]")) % 4 % 7; +	CHECK_XPATH_NODESET(doc, STR("/descendant-or-self::node()[3]/child::para")) % 4 % 5 % 6; +} +  #endif | 
