diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-08-27 14:22:55 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-08-27 15:28:57 +0200 |
commit | dce9bc257098d554502d41a5f4f90451d821e86b (patch) | |
tree | 79f4ed1e780dffb1e1160dce85c3ff65b7dd0156 | |
parent | e8309cbd2439608dc7e07916a5a1b2780955154d (diff) | |
download | tracker-dce9bc257098d554502d41a5f4f90451d821e86b.tar.gz |
tests: Add tests for property paths used from several graphs
These should resolve to different subqueries and not get confused with
what the right graph is.
4 files changed, 26 insertions, 0 deletions
diff --git a/tests/libtracker-data/property-paths/data-3.rq b/tests/libtracker-data/property-paths/data-3.rq new file mode 100644 index 000000000..87da24ec1 --- /dev/null +++ b/tests/libtracker-data/property-paths/data-3.rq @@ -0,0 +1,15 @@ +INSERT { + GRAPH <A> { + _:a a foaf:Person ; + foaf:name "a" ; + foaf:knows _:b . + _:b a foaf:Person ; + foaf:name "A_b" . + } + GRAPH <B> { + _:a a foaf:Person; + foaf:knows _:c . + _:c a foaf:Person ; + foaf:name "B_c" . + } +} diff --git a/tests/libtracker-data/property-paths/mixed-graphs.out b/tests/libtracker-data/property-paths/mixed-graphs.out new file mode 100644 index 000000000..ec7394e44 --- /dev/null +++ b/tests/libtracker-data/property-paths/mixed-graphs.out @@ -0,0 +1 @@ +"a" "A_b" "B_c" diff --git a/tests/libtracker-data/property-paths/mixed-graphs.rq b/tests/libtracker-data/property-paths/mixed-graphs.rq new file mode 100644 index 000000000..4c7bb155e --- /dev/null +++ b/tests/libtracker-data/property-paths/mixed-graphs.rq @@ -0,0 +1,9 @@ +SELECT ?a ?n1 ?n2 { + GRAPH <A> { + ?u foaf:name ?a ; + foaf:knows/foaf:name ?n1 + } + GRAPH <B> { + ?u foaf:knows/foaf:name ?n2 + } +} diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c index b7df4b1e9..ff20def91 100644 --- a/tests/libtracker-data/tracker-sparql-test.c +++ b/tests/libtracker-data/tracker-sparql-test.c @@ -247,6 +247,7 @@ const TestInfo tests[] = { { "property-paths/mixed-recursive-and-inverse-3", "property-paths/data", FALSE }, { "property-paths/mixed-optional-and-sequence-1", "property-paths/data-2", FALSE }, { "property-paths/mixed-optional-and-sequence-2", "property-paths/data-2", FALSE }, + { "property-paths/mixed-graphs", "property-paths/data-3", FALSE }, /* Update tests */ { "update/insert-data-query-1", "update/insert-data-1", FALSE, FALSE }, { "update/insert-data-query-2", "update/insert-data-2", FALSE, TRUE }, |