Skip to content

Commit 3e53116

Browse files
Tptafs
authored andcommitted
Improve coverage GRAPH ?g {}
`Graph <...> {}` should return a single empty solution if the graph exists and no solution if it does not
1 parent a8ff191 commit 3e53116

File tree

5 files changed

+39
-1
lines changed

5 files changed

+39
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT * { GRAPH <data-g1.ttl> {} }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
2+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3+
4+
[] rdf:type rs:ResultSet ;
5+
rs:solution [] .
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PREFIX ex: <http://example.org/>
2+
3+
SELECT * { GRAPH ex:unknown {} }
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
2+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3+
4+
[] rdf:type rs:ResultSet .

sparql/sparql10/graph/manifest.ttl

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
:dawg-graph-10b
2323
:dawg-graph-11
2424
:graph-empty
25+
:graph-exist
26+
:graph-not-exist
2527
).
2628

2729
:dawg-graph-01 rdf:type mf:QueryEvaluationTest ;
@@ -168,7 +170,7 @@
168170

169171
:graph-empty rdf:type mf:QueryEvaluationTest ;
170172
mf:name "graph-empty" ;
171-
rdfs:comment "Graph with empty BGP: list all named graphs" ;
173+
rdfs:comment "Variable graph with empty BGP: list all named graphs" ;
172174
mf:action
173175
[ qt:query <graph-empty.rq> ;
174176
qt:data <data-g1.ttl> ;
@@ -177,3 +179,26 @@
177179
] ;
178180
mf:result <graph-empty.ttl> ;
179181
.
182+
183+
:graph-exist rdf:type mf:QueryEvaluationTest ;
184+
mf:name "graph-exist" ;
185+
rdfs:comment "Set graph with empty BGP: returns an empty tuple because the graph exists" ;
186+
mf:action
187+
[ qt:query <graph-empty-exist.rq> ;
188+
qt:data <data-g1.ttl> ;
189+
qt:graphData <data-g1.ttl> ;
190+
qt:graphData <data-g2.ttl> ;
191+
] ;
192+
mf:result <graph-empty-exist.ttl> ;
193+
.
194+
:graph-not-exist rdf:type mf:QueryEvaluationTest ;
195+
mf:name "graph-not-exist" ;
196+
rdfs:comment "Set graph with empty BGP: returns an empty tuple because the graph exists" ;
197+
mf:action
198+
[ qt:query <graph-empty-not-exist.rq> ;
199+
qt:data <data-g1.ttl> ;
200+
qt:graphData <data-g1.ttl> ;
201+
qt:graphData <data-g2.ttl> ;
202+
] ;
203+
mf:result <graph-empty-not-exist.ttl> ;
204+
.

0 commit comments

Comments
 (0)