Skip to content

Commit 4bfb467

Browse files
Tptafs
authored andcommitted
SPARQL 1.0: cover "GRAPH ?g {}" case
It should list all named graphs. We did not have any test of GRAPH with an empty BGP.
1 parent dfeb021 commit 4bfb467

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

sparql/sparql10/graph/graph-empty.rq

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT * { GRAPH ?g {} }

sparql/sparql10/graph/graph-empty.ttl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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:resultVariable "g" ;
6+
rs:solution [ rs:binding [ rs:value <data-g1.ttl> ;
7+
rs:variable "g"
8+
]
9+
] ;
10+
rs:solution [ rs:binding [ rs:value <data-g2.ttl> ;
11+
rs:variable "g"
12+
]
13+
] .

sparql/sparql10/graph/manifest.ttl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
:dawg-graph-09
2222
:dawg-graph-10b
2323
:dawg-graph-11
24+
:graph-empty
2425
).
2526

2627
:dawg-graph-01 rdf:type mf:QueryEvaluationTest ;
@@ -165,3 +166,14 @@
165166
mf:result <graph-11.ttl> ;
166167
.
167168

169+
:graph-empty rdf:type mf:QueryEvaluationTest ;
170+
mf:name "graph-empty" ;
171+
rdfs:comment "Graph with empty BGP: list all named graphs" ;
172+
mf:action
173+
[ qt:query <graph-empty.rq> ;
174+
qt:data <data-g1.ttl> ;
175+
qt:graphData <data-g1.ttl> ;
176+
qt:graphData <data-g2.ttl> ;
177+
] ;
178+
mf:result <graph-empty.ttl> ;
179+
.

0 commit comments

Comments
 (0)