summaryrefslogtreecommitdiff
path: root/tests/test_dom_traverse.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-07-07 17:10:51 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-07-07 17:10:51 +0000
commit9adf67be3a3700c3ae715bb27bad0e1b00412bf1 (patch)
tree6d90d5f570510fb8a2d545ed3d63dc4c35409983 /tests/test_dom_traverse.cpp
parent8ff8f86f103ea1c7463785cdef4cbf4f2c7cf11e (diff)
Fixed strequalrange so that it matches the description (this also fixes first_element_by_path prefix bug), added more first_element_by_path tests
git-svn-id: http://pugixml.googlecode.com/svn/trunk@570 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_dom_traverse.cpp')
-rw-r--r--tests/test_dom_traverse.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_dom_traverse.cpp b/tests/test_dom_traverse.cpp
index 2e6b5e3..896bf6f 100644
--- a/tests/test_dom_traverse.cpp
+++ b/tests/test_dom_traverse.cpp
@@ -596,6 +596,13 @@ TEST_XML(dom_node_first_element_by_path, "<node><child1>text<child2/></child1></
CHECK(doc.child(STR("node")).first_element_by_path(STR("..")) == doc);
CHECK(doc.child(STR("node")).first_element_by_path(STR(".")) == doc.child(STR("node")));
+
+ CHECK(doc.child(STR("node")).first_element_by_path(STR("../node/./child1/../.")) == doc.child(STR("node")));
+
+ CHECK(doc.child(STR("node")).first_element_by_path(STR("child1")) == doc.child(STR("node")).child(STR("child1")));
+ CHECK(doc.child(STR("node")).first_element_by_path(STR("child1/")) == doc.child(STR("node")).child(STR("child1")));
+ CHECK(doc.child(STR("node")).first_element_by_path(STR("child")) == xml_node());
+ CHECK(doc.child(STR("node")).first_element_by_path(STR("child11")) == xml_node());
}
struct test_walker: xml_tree_walker