summaryrefslogtreecommitdiff
path: root/tests/test_xpath_parse.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-30 20:44:15 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-30 20:44:15 +0000
commit555a184f4f8223141434db41429eb68f5f8fd916 (patch)
tree441480cc8c38f89eb60b082fa0c314c2f69a7d24 /tests/test_xpath_parse.cpp
parent97a761615f6db3be5f87b258e5288c09d445942c (diff)
Fixed XPath parsing (numbers of the form \d+\. are now parsed correctly, stray colon does not act as eof token)
git-svn-id: http://pugixml.googlecode.com/svn/trunk@476 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_xpath_parse.cpp')
-rw-r--r--tests/test_xpath_parse.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_xpath_parse.cpp b/tests/test_xpath_parse.cpp
index bedb3e9..0caf104 100644
--- a/tests/test_xpath_parse.cpp
+++ b/tests/test_xpath_parse.cpp
@@ -29,6 +29,7 @@ TEST(xpath_number_parse)
CHECK_XPATH_NUMBER(c, STR("123.456"), 123.456);
CHECK_XPATH_NUMBER(c, STR(".123"), 0.123);
CHECK_XPATH_NUMBER(c, STR("123.4567890123456789012345"), 123.4567890123456789012345);
+ CHECK_XPATH_NUMBER(c, STR("123."), 123);
}
TEST(xpath_number_error)
@@ -225,12 +226,11 @@ TEST(xpath_parse_jaxen_invalid)
STR("///triple slash"), STR("/numbers numbers"), STR("/a/b[c > d]efg"), STR("/inv/child::"), STR("/invoice/@test[abcd"),
STR("/invoice/@test[abcd > x"), STR("string-length('a"), STR("/descendant::()"), STR("(1 + 1"), STR("!false()"),
STR("$author"), STR("10 + $foo"), STR("$foo:bar"), STR("$varname[@a='1']"), STR("foo/$variable/foo"),
- STR(".[1]"), STR("chyld::foo"), STR("foo/tacos()"), STR("foo/tacos()"), STR("/foo/bar[baz"), STR("//"), // STR("*:foo"), $$ should not compile
+ STR(".[1]"), STR("chyld::foo"), STR("foo/tacos()"), STR("foo/tacos()"), STR("/foo/bar[baz"), STR("//"), STR("*:foo"),
STR("/cracker/cheese[(mold > 1) and (sense/taste"),
// From xpath-as3 tests
- STR("a b"), STR("//self::node())"), STR("/x/y[contains(self::node())"), STR("/x/y[contains(self::node()]"), STR("///"),
- STR("text::a"), // STR("***"), $$ should not compile
+ STR("a b"), STR("//self::node())"), STR("/x/y[contains(self::node())"), STR("/x/y[contains(self::node()]"), STR("///"), STR("text::a"),
// From haXe-xpath tests
STR("|/gjs"), STR("+3"), STR("/html/body/p != ---'div'/a"), STR(""), STR("@"), STR("#akf"), STR(",")