diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-01-30 23:24:20 -0800 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-01-30 23:52:32 -0800 |
commit | a1bc15c8d525ff2cac165cc0e5d08b272d79fc33 (patch) | |
tree | a17977f8fc4b5f57ccfddcbc1e3aa2032074346c /tests/test_xpath_paths.cpp | |
parent | f500435cb49c3b532cec562bb63470af0c9e6a31 (diff) |
tests: Add more coverage tests
Expand out of memory coverage during XPath parsing and evaluation and
add some other small tests.
Diffstat (limited to 'tests/test_xpath_paths.cpp')
-rw-r--r-- | tests/test_xpath_paths.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_xpath_paths.cpp b/tests/test_xpath_paths.cpp index 69215d8..7915df1 100644 --- a/tests/test_xpath_paths.cpp +++ b/tests/test_xpath_paths.cpp @@ -358,6 +358,13 @@ TEST_XML_FLAGS(xpath_paths_nodetest_principal, "<node attr='value'>pcdata<child/ CHECK_XPATH_NODESET(doc, STR("child::abra:*/attribute::abra:*/descendant-or-self::abra:*")); // attribute is not of element type } +TEST_XML(xpath_paths_nodetest_attribute_namespace, "<node a1='v1' xmlns:x='?' />") +{ + CHECK_XPATH_NODESET(doc, STR("node/attribute::node()")) % 3; + CHECK_XPATH_NODESET(doc, STR("node/attribute::xmlns:x")); + CHECK_XPATH_NODESET(doc, STR("node/attribute::xmlns:*")); +} + TEST_XML(xpath_paths_absolute, "<node attr='value'><foo><foo/><foo/></foo></node>") { xml_node c; |