[tracker] tests: Add more tests for BIND behavior



commit 5f3f8394caf065b887912e4c54eee1fe813f3c50
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Feb 23 12:37:18 2019 +0100

    tests: Add more tests for BIND behavior
    
    Added tests for BIND before other statements

 tests/libtracker-data/bind/bind5.out        | 1 +
 tests/libtracker-data/bind/bind5.rq         | 1 +
 tests/libtracker-data/bind/bind6.out        | 1 +
 tests/libtracker-data/bind/bind6.rq         | 1 +
 tests/libtracker-data/bind/bind7.out        | 1 +
 tests/libtracker-data/bind/bind7.rq         | 1 +
 tests/libtracker-data/tracker-sparql-test.c | 3 +++
 7 files changed, 9 insertions(+)
---
diff --git a/tests/libtracker-data/bind/bind5.out b/tests/libtracker-data/bind/bind5.out
new file mode 100644
index 000000000..192548e94
--- /dev/null
+++ b/tests/libtracker-data/bind/bind5.out
@@ -0,0 +1 @@
+"42"
diff --git a/tests/libtracker-data/bind/bind5.rq b/tests/libtracker-data/bind/bind5.rq
new file mode 100644
index 000000000..4207421be
--- /dev/null
+++ b/tests/libtracker-data/bind/bind5.rq
@@ -0,0 +1 @@
+SELECT ?a { BIND (42 AS ?a) }
diff --git a/tests/libtracker-data/bind/bind6.out b/tests/libtracker-data/bind/bind6.out
new file mode 100644
index 000000000..9d35f19f2
--- /dev/null
+++ b/tests/libtracker-data/bind/bind6.out
@@ -0,0 +1 @@
+"42"   "foo"
diff --git a/tests/libtracker-data/bind/bind6.rq b/tests/libtracker-data/bind/bind6.rq
new file mode 100644
index 000000000..439d08aef
--- /dev/null
+++ b/tests/libtracker-data/bind/bind6.rq
@@ -0,0 +1 @@
+SELECT ?a ?b { BIND (42 AS ?a) . BIND ('foo' AS ?b) }
diff --git a/tests/libtracker-data/bind/bind7.out b/tests/libtracker-data/bind/bind7.out
new file mode 100644
index 000000000..bf4e57471
--- /dev/null
+++ b/tests/libtracker-data/bind/bind7.out
@@ -0,0 +1 @@
+"http://example.org/ns#a2";     "http://example.org/ns#integer"; "42"
diff --git a/tests/libtracker-data/bind/bind7.rq b/tests/libtracker-data/bind/bind7.rq
new file mode 100644
index 000000000..50611a514
--- /dev/null
+++ b/tests/libtracker-data/bind/bind7.rq
@@ -0,0 +1 @@
+SELECT ?s ?p ?o { BIND (42 AS ?o) . ?s ?p ?o }
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index 79f1e2107..68bd1f77b 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -150,6 +150,9 @@ const TestInfo tests[] = {
        { "bind/bind2", "bind/data", FALSE },
        { "bind/bind3", "bind/data", FALSE },
        { "bind/bind4", "bind/data", FALSE },
+       { "bind/bind5", "bind/data", FALSE },
+       { "bind/bind6", "bind/data", FALSE },
+       { "bind/bind7", "bind/data", FALSE },
        /* Property paths */
        { "property-paths/inverse-path-1", "property-paths/data", FALSE },
        { "property-paths/inverse-path-2", "property-paths/data", FALSE },


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