Permalink
Browse files

Fix parser symbol / function map for STRBEFORE(), and updated tests

  • Loading branch information...
1 parent a635344 commit 7efc4d172363bd4924f842bc4e9d54d14eb391c5 @swh swh committed Sep 11, 2015
Showing with 16 additions and 16 deletions.
  1. +1 −1 src/frontend/results.c
  2. +15 −15 tests/httpd/exemplar/functions-substr
View
@@ -374,7 +374,7 @@ fs_value fs_expression_eval(fs_query *q, int row, int block, rasqal_expression *
return fn_strbefore(q, fs_expression_eval(q, row, block, e->arg1),
fs_expression_eval(q, row, block, e->arg2));
case RASQAL_EXPR_STRAFTER:
- return fn_strbefore(q, fs_expression_eval(q, row, block, e->arg1),
+ return fn_strafter(q, fs_expression_eval(q, row, block, e->arg1),
fs_expression_eval(q, row, block, e->arg2));
case RASQAL_EXPR_REPLACE:
return fs_value_error(FS_ERROR_INVALID_TYPE, "fn:replace not yet implemented");
@@ -135,32 +135,32 @@ Query: SELECT (STRBEFORE(STRLANG(?s, "en-GB"), "89") AS ?be) WHERE { <test:data>
""@en-GB
Query: SELECT (STRAFTER(?s, "789") AS ?be) WHERE { <test:data> <test:bcd> ?s } ORDER BY ?s
?be
-"-123456"
+"0.23239300"
""
""
""
""
-"0123456"
-"0123456"
-"0123456"
-"0123456"
-"0123456"
-"0123456"
+".0123456789012345678"
+"0123456789012345678"
+"01234567890123456789"
+"012345678901234567890"
+"0123456789012345678901"
+"01234567890123456789012"
Query: SELECT (STRAFTER(STRLANG(?s, "en-GB"), "89") AS ?be) WHERE { <test:data> <test:bcd> ?s } ORDER BY ?s
?be
-"-1234567"@en-GB
+"0.23239300"@en-GB
""@en-GB
-"-1234567"@en-GB
+"0.23239300"@en-GB
""@en-GB
""@en-GB
""@en-GB
""@en-GB
-"01234567"@en-GB
-"01234567"@en-GB
-"01234567"@en-GB
-"01234567"@en-GB
-"01234567"@en-GB
-"01234567"@en-GB
+".0123456789012345678"@en-GB
+"0123456789012345678"@en-GB
+"01234567890123456789"@en-GB
+"012345678901234567890"@en-GB
+"0123456789012345678901"@en-GB
+"01234567890123456789012"@en-GB
""@en-GB
200 deleted successfully
This is a 4store SPARQL server [VERSION]

0 comments on commit 7efc4d1

Please sign in to comment.