diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2022-04-03 14:36:10 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2022-04-03 18:46:57 +0200 |
commit | 26decd7b7cefa7e76a1a86a8ca8b21aff1cb9904 (patch) | |
tree | f6d4de8c0d4a743b547626d49273e84a74cce496 /tests/core/constraint | |
parent | aa2785c8d3a8b76d08efec75a1c5ba2fb45d5d14 (diff) | |
download | tracker-26decd7b7cefa7e76a1a86a8ca8b21aff1cb9904.tar.gz |
tests: Rename libtracker-data tests to 'core'
Abandon the static library name for these tests.
Diffstat (limited to 'tests/core/constraint')
30 files changed, 84 insertions, 0 deletions
diff --git a/tests/core/constraint/coexisting-1.out b/tests/core/constraint/coexisting-1.out new file mode 100644 index 000000000..8be680548 --- /dev/null +++ b/tests/core/constraint/coexisting-1.out @@ -0,0 +1,4 @@ +"a" +"b" +"c" +"d" diff --git a/tests/core/constraint/coexisting-1.rq b/tests/core/constraint/coexisting-1.rq new file mode 100644 index 000000000..3fc6ee60a --- /dev/null +++ b/tests/core/constraint/coexisting-1.rq @@ -0,0 +1,3 @@ +CONSTRAINT GRAPH ALL,<A> +SELECT ?u { ?u a example:A } +ORDER BY ?u diff --git a/tests/core/constraint/coexisting-2.out b/tests/core/constraint/coexisting-2.out new file mode 100644 index 000000000..22d3c21b7 --- /dev/null +++ b/tests/core/constraint/coexisting-2.out @@ -0,0 +1,2 @@ +"a" +"d" diff --git a/tests/core/constraint/coexisting-2.rq b/tests/core/constraint/coexisting-2.rq new file mode 100644 index 000000000..439678b18 --- /dev/null +++ b/tests/core/constraint/coexisting-2.rq @@ -0,0 +1,3 @@ +CONSTRAINT GRAPH DEFAULT,<A> +SELECT ?u { ?u a example:A } +ORDER BY ?u diff --git a/tests/core/constraint/coexisting-3.out b/tests/core/constraint/coexisting-3.out new file mode 100644 index 000000000..8be680548 --- /dev/null +++ b/tests/core/constraint/coexisting-3.out @@ -0,0 +1,4 @@ +"a" +"b" +"c" +"d" diff --git a/tests/core/constraint/coexisting-3.rq b/tests/core/constraint/coexisting-3.rq new file mode 100644 index 000000000..1d3f3299c --- /dev/null +++ b/tests/core/constraint/coexisting-3.rq @@ -0,0 +1,3 @@ +CONSTRAINT GRAPH ALL,DEFAULT +SELECT ?u { ?u a example:A } +ORDER BY ?u diff --git a/tests/core/constraint/coexisting-4.out b/tests/core/constraint/coexisting-4.out new file mode 100644 index 000000000..071144f21 --- /dev/null +++ b/tests/core/constraint/coexisting-4.out @@ -0,0 +1,2 @@ +"a" +"b" diff --git a/tests/core/constraint/coexisting-4.rq b/tests/core/constraint/coexisting-4.rq new file mode 100644 index 000000000..7dec44fba --- /dev/null +++ b/tests/core/constraint/coexisting-4.rq @@ -0,0 +1,3 @@ +CONSTRAINT GRAPH <A>,<B> +SELECT ?u { ?u a example:A } +ORDER BY ?u diff --git a/tests/core/constraint/data.rq b/tests/core/constraint/data.rq new file mode 100644 index 000000000..ef6ac9e25 --- /dev/null +++ b/tests/core/constraint/data.rq @@ -0,0 +1,17 @@ +INSERT { + GRAPH <A> { + <a> a example:A ; + example:p 42 + } + GRAPH <B> { + <b> a example:A ; + example:p 21 + } + GRAPH <C> { + <c> a example:A ; + example:p 7 + } + + <d> a example:A ; + example:p 3; +} diff --git a/tests/core/constraint/empty-graph-1.out b/tests/core/constraint/empty-graph-1.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/core/constraint/empty-graph-1.out diff --git a/tests/core/constraint/empty-graph-1.rq b/tests/core/constraint/empty-graph-1.rq new file mode 100644 index 000000000..5587d24ee --- /dev/null +++ b/tests/core/constraint/empty-graph-1.rq @@ -0,0 +1,2 @@ +CONSTRAINT GRAPH +SELECT ?u { ?u a example:A } diff --git a/tests/core/constraint/empty-graph-2.out b/tests/core/constraint/empty-graph-2.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/core/constraint/empty-graph-2.out diff --git a/tests/core/constraint/empty-graph-2.rq b/tests/core/constraint/empty-graph-2.rq new file mode 100644 index 000000000..1d9ad6932 --- /dev/null +++ b/tests/core/constraint/empty-graph-2.rq @@ -0,0 +1,2 @@ +CONSTRAINT GRAPH +SELECT ?u ?p ?o { ?u ?p ?o } diff --git a/tests/core/constraint/empty-graph-3.out b/tests/core/constraint/empty-graph-3.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/core/constraint/empty-graph-3.out diff --git a/tests/core/constraint/empty-graph-3.rq b/tests/core/constraint/empty-graph-3.rq new file mode 100644 index 000000000..5e981922c --- /dev/null +++ b/tests/core/constraint/empty-graph-3.rq @@ -0,0 +1,2 @@ +CONSTRAINT GRAPH +SELECT ?u { GRAPH <A> { ?u example:p 42 } } diff --git a/tests/core/constraint/empty-graph-4.out b/tests/core/constraint/empty-graph-4.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/core/constraint/empty-graph-4.out diff --git a/tests/core/constraint/empty-graph-4.rq b/tests/core/constraint/empty-graph-4.rq new file mode 100644 index 000000000..2994635aa --- /dev/null +++ b/tests/core/constraint/empty-graph-4.rq @@ -0,0 +1,2 @@ +CONSTRAINT GRAPH +SELECT ?g ?u { GRAPH ?g { ?u a example:A } } diff --git a/tests/core/constraint/nested-1.out b/tests/core/constraint/nested-1.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/core/constraint/nested-1.out diff --git a/tests/core/constraint/nested-1.rq b/tests/core/constraint/nested-1.rq new file mode 100644 index 000000000..db172998d --- /dev/null +++ b/tests/core/constraint/nested-1.rq @@ -0,0 +1,3 @@ +CONSTRAINT GRAPH +CONSTRAINT GRAPH <A> +SELECT ?u { ?u a example:A } diff --git a/tests/core/constraint/nested-2.out b/tests/core/constraint/nested-2.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/core/constraint/nested-2.out diff --git a/tests/core/constraint/nested-2.rq b/tests/core/constraint/nested-2.rq new file mode 100644 index 000000000..dafb152b9 --- /dev/null +++ b/tests/core/constraint/nested-2.rq @@ -0,0 +1,3 @@ +CONSTRAINT GRAPH <A> +CONSTRAINT GRAPH <B> +SELECT ?u { ?u a example:A } diff --git a/tests/core/constraint/nested-3.out b/tests/core/constraint/nested-3.out new file mode 100644 index 000000000..19010cc35 --- /dev/null +++ b/tests/core/constraint/nested-3.out @@ -0,0 +1 @@ +"b" diff --git a/tests/core/constraint/nested-3.rq b/tests/core/constraint/nested-3.rq new file mode 100644 index 000000000..a46945d5d --- /dev/null +++ b/tests/core/constraint/nested-3.rq @@ -0,0 +1,3 @@ +CONSTRAINT GRAPH <A>, <B> +CONSTRAINT GRAPH <B> +SELECT ?u { ?u a example:A } diff --git a/tests/core/constraint/nested-4.out b/tests/core/constraint/nested-4.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/core/constraint/nested-4.out diff --git a/tests/core/constraint/nested-4.rq b/tests/core/constraint/nested-4.rq new file mode 100644 index 000000000..f43a8a094 --- /dev/null +++ b/tests/core/constraint/nested-4.rq @@ -0,0 +1,3 @@ +CONSTRAINT GRAPH ALL +CONSTRAINT GRAPH +SELECT ?u { ?u a example:A } diff --git a/tests/core/constraint/nested-5.out b/tests/core/constraint/nested-5.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/core/constraint/nested-5.out diff --git a/tests/core/constraint/nested-5.rq b/tests/core/constraint/nested-5.rq new file mode 100644 index 000000000..3b2cd4b50 --- /dev/null +++ b/tests/core/constraint/nested-5.rq @@ -0,0 +1,3 @@ +CONSTRAINT GRAPH +CONSTRAINT GRAPH ALL +SELECT ?u { ?u a example:A } diff --git a/tests/core/constraint/nested-6.out b/tests/core/constraint/nested-6.out new file mode 100644 index 000000000..5775b9f8c --- /dev/null +++ b/tests/core/constraint/nested-6.out @@ -0,0 +1 @@ +"d" diff --git a/tests/core/constraint/nested-6.rq b/tests/core/constraint/nested-6.rq new file mode 100644 index 000000000..0f5c67fee --- /dev/null +++ b/tests/core/constraint/nested-6.rq @@ -0,0 +1,3 @@ +CONSTRAINT GRAPH ALL +CONSTRAINT GRAPH DEFAULT +SELECT ?u { ?u a example:A } diff --git a/tests/core/constraint/test.ontology b/tests/core/constraint/test.ontology new file mode 100644 index 000000000..6f88d2eee --- /dev/null +++ b/tests/core/constraint/test.ontology @@ -0,0 +1,15 @@ +@prefix example: <http://example/> . +@prefix nrl: <http://tracker.api.gnome.org/ontology/v3/nrl#> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +example: a nrl:Namespace ; + nrl:prefix "example" . + +example:A a rdfs:Class ; + rdfs:subClassOf rdfs:Resource . + +example:p a rdf:Property ; + rdfs:domain example:A ; + rdfs:range xsd:integer . |