summaryrefslogtreecommitdiff
path: root/tests/test_xpath_parse.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-31 11:43:54 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-31 11:43:54 +0000
commit2f88c5dbdf7add230493fa3714878cfc30879a15 (patch)
tree495103ded27c969e77c9900ee08cd5e21843e790 /tests/test_xpath_parse.cpp
parentf1bfe4cc64218d015a8415b37b30127327df8b39 (diff)
tests: Added more XPath parsing tests
git-svn-id: http://pugixml.googlecode.com/svn/trunk@481 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_xpath_parse.cpp')
-rw-r--r--tests/test_xpath_parse.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_xpath_parse.cpp b/tests/test_xpath_parse.cpp
index 0caf104..b977ce5 100644
--- a/tests/test_xpath_parse.cpp
+++ b/tests/test_xpath_parse.cpp
@@ -162,6 +162,15 @@ TEST(xpath_parse_paths_valid)
STR("id(\"pet\")/SELECT[@name=\"species\"]/OPTION[@selected]/@value"), STR("descendant::INPUT[@name=\"name\"]/@value"), STR("id(\"pet\")/INPUT[@name=\"gender\" and @checked]/@value"),
STR("//TEXTAREA[@name=\"description\"]/text()"), STR("id(\"div1\")|id(\"div2\")|id(\"div3 div4 div5\")"), STR("//LI[1]"), STR("//LI[last()]/text()"), STR("//LI[position() mod 2]/@class"),
STR("//text()[.=\"foo\"]"), STR("descendant-or-self::SPAN[position() > 2]"), STR("descendant::*[contains(@class,\" fruit \")]"),
+
+ // ajaxslt considers this path invalid, however I believe it's valid as per spec
+ STR("***"),
+
+ // Oasis MSFT considers this path invalid, however I believe it's valid as per spec
+ STR("**..**"),
+
+ // Miscellaneous
+ STR("..***..***.***.***..***..***..")
};
for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); ++i)
@@ -234,6 +243,9 @@ TEST(xpath_parse_jaxen_invalid)
// From haXe-xpath tests
STR("|/gjs"), STR("+3"), STR("/html/body/p != ---'div'/a"), STR(""), STR("@"), STR("#akf"), STR(",")
+
+ // Miscellaneous
+ STR("..."), STR("...."), STR("**"), STR("****"), STR("******"), STR("..***..***.***.***..***..***..*")
};
for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); ++i)