diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2021-03-21 17:55:22 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2021-03-21 18:39:08 +0100 |
commit | 8a28feb1bff52bf518a4728cbebf2317ffc7b4bd (patch) | |
tree | 8b866697c8207f673d9ff05f2bff45833af0dc98 | |
parent | 4c024b53e6f64213284dc8cf7bb94df51859bd21 (diff) | |
download | tracker-8a28feb1bff52bf518a4728cbebf2317ffc7b4bd.tar.gz |
tests: Add test for OPTIONAL inside GRAPH ?g {}
This broke in recent SQLite releases, and only caught by one
tracker-miners test. Make it sure we have a test here for this.
-rw-r--r-- | tests/libtracker-data/graph/graph-7.out | 2 | ||||
-rw-r--r-- | tests/libtracker-data/graph/graph-7.rq | 7 | ||||
-rw-r--r-- | tests/libtracker-data/tracker-sparql-test.c | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/tests/libtracker-data/graph/graph-7.out b/tests/libtracker-data/graph/graph-7.out new file mode 100644 index 000000000..b87869c39 --- /dev/null +++ b/tests/libtracker-data/graph/graph-7.out @@ -0,0 +1,2 @@ +"http://example/graphA" "http://example/resource" "73" +"http://example/graphB" "http://example/resource" "42" diff --git a/tests/libtracker-data/graph/graph-7.rq b/tests/libtracker-data/graph/graph-7.rq new file mode 100644 index 000000000..a72b4366e --- /dev/null +++ b/tests/libtracker-data/graph/graph-7.rq @@ -0,0 +1,7 @@ +SELECT ?g ?s ?v WHERE { + GRAPH ?g { + ?s a rdfs:Resource . + OPTIONAL { ?s example:p ?v } . + } +} +ORDER BY ?g ?s ?v
\ No newline at end of file diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c index 9552d0aa4..60475720b 100644 --- a/tests/libtracker-data/tracker-sparql-test.c +++ b/tests/libtracker-data/tracker-sparql-test.c @@ -162,6 +162,7 @@ const TestInfo tests[] = { { "graph/graph-4", "graph/data-3", FALSE }, { "graph/graph-5", "graph/data-4", FALSE }, { "graph/graph-6", "graph/data-5", FALSE }, + { "graph/graph-7", "graph/data-5", FALSE }, { "graph/non-existent-1", "graph/data-1", FALSE }, { "graph/non-existent-2", "graph/data-1", FALSE }, { "graph/non-existent-3", "graph/data-1", FALSE }, |