[tracker/rss-enclosures] Test http://www.w3.org/2005/xpath-functions#substring() function.



commit fa33abb5132b91f1ed1c4326a640f2dcb07799d9
Author: Mathias Hasselmann <hasselmm gnome org>
Date:   Mon Apr 12 20:17:41 2010 +0200

    Test http://www.w3.org/2005/xpath-functions#substring() function.

 .../functions/functions-xpath-5.out                |    5 +++++
 .../libtracker-data/functions/functions-xpath-5.rq |   10 ++++++++++
 tests/libtracker-data/tracker-sparql-test.c        |    1 +
 3 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/tests/libtracker-data/functions/functions-xpath-5.out b/tests/libtracker-data/functions/functions-xpath-5.out
new file mode 100644
index 0000000..c89a7dc
--- /dev/null
+++ b/tests/libtracker-data/functions/functions-xpath-5.out
@@ -0,0 +1,5 @@
+"ing"	"ti"
+"oses"	"po"
+""	"t"
+""	"t"
+""	""
diff --git a/tests/libtracker-data/functions/functions-xpath-5.rq b/tests/libtracker-data/functions/functions-xpath-5.rq
new file mode 100644
index 0000000..0734bb9
--- /dev/null
+++ b/tests/libtracker-data/functions/functions-xpath-5.rq
@@ -0,0 +1,10 @@
+PREFIX ex: <http://example/>
+PREFIX fn: <http://www.w3.org/2005/xpath-functions#>
+
+SELECT
+  fn:substring(?t,5)
+  fn:substring(?t,4,2)
+
+WHERE {
+  ?_x ex:t ?t .
+}
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index 58603f7..866f114 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -83,6 +83,7 @@ const TestInfo tests[] = {
 	{ "functions/functions-xpath-2", "functions/data-1", FALSE },
 	{ "functions/functions-xpath-3", "functions/data-1", FALSE },
 	{ "functions/functions-xpath-4", "functions/data-1", FALSE },
+	{ "functions/functions-xpath-5", "functions/data-1", FALSE },
 	{ "graph/graph-1", "graph/data-1", FALSE },
 	{ "graph/graph-2", "graph/data-2", FALSE },
 	{ "graph/graph-3", "graph/data-3", FALSE },



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]