summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_xpath_parse.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_xpath_parse.cpp b/tests/test_xpath_parse.cpp
index b977ce5..caebb9b 100644
--- a/tests/test_xpath_parse.cpp
+++ b/tests/test_xpath_parse.cpp
@@ -254,4 +254,19 @@ TEST(xpath_parse_jaxen_invalid)
}
}
+TEST_XML(xpath_parse_absolute, "<div><s/></div>")
+{
+ CHECK_XPATH_NODESET(doc, STR("/")) % 1;
+
+ CHECK_XPATH_NODESET(doc, STR("/div/s")) % 3;
+ CHECK_XPATH_NODESET(doc, STR("/ div /s")) % 3;
+ CHECK_XPATH_FAIL(STR("/ div 5"));
+
+ CHECK_XPATH_NODESET(doc, STR("/*/s")) % 3;
+ CHECK_XPATH_NODESET(doc, STR("/ * /s")) % 3;
+ CHECK_XPATH_FAIL(STR("/ * 5"));
+
+ CHECK_XPATH_NODESET(doc, STR("/*[/]")) % 2;
+}
+
#endif