summaryrefslogtreecommitdiff
path: root/tests/test_xpath_functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_xpath_functions.cpp')
-rw-r--r--tests/test_xpath_functions.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test_xpath_functions.cpp b/tests/test_xpath_functions.cpp
index b0d0b52..016c722 100644
--- a/tests/test_xpath_functions.cpp
+++ b/tests/test_xpath_functions.cpp
@@ -377,6 +377,7 @@ TEST(xpath_string_substring_before)
CHECK_XPATH_STRING(c, STR("substring-before('abc', 'cd')"), STR(""));
CHECK_XPATH_STRING(c, STR("substring-before('abc', 'b')"), STR("a"));
CHECK_XPATH_STRING(c, STR("substring-before('abc', 'c')"), STR("ab"));
+ CHECK_XPATH_STRING(c, STR("substring-before('abc', '')"), STR(""));
CHECK_XPATH_STRING(c, STR("substring-before('', '')"), STR(""));
// substring-before with 2 arguments, from W3C standard
@@ -402,6 +403,7 @@ TEST(xpath_string_substring_after)
CHECK_XPATH_STRING(c, STR("substring-after('abc', 'cd')"), STR(""));
CHECK_XPATH_STRING(c, STR("substring-after('abc', 'b')"), STR("c"));
CHECK_XPATH_STRING(c, STR("substring-after('abc', 'c')"), STR(""));
+ CHECK_XPATH_STRING(c, STR("substring-after('abc', '')"), STR("abc"));
CHECK_XPATH_STRING(c, STR("substring-after('', '')"), STR(""));
// substring-before with 2 arguments, from W3C standard