Skip to content

Commit

Permalink
SPARQL 1.0: cover "GRAPH ?g {}" case
Browse files Browse the repository at this point in the history
It should list all named graphs.
We did not have any test of GRAPH with an empty BGP.
  • Loading branch information
Tpt committed Dec 20, 2024
1 parent dfeb021 commit 0bbf230
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sparql/sparql10/graph/graph-empty.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PREFIX : <http://example/>

SELECT *
{ GRAPH ?g {} }
13 changes: 13 additions & 0 deletions sparql/sparql10/graph/graph-empty.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

[] rdf:type rs:ResultSet ;
rs:resultVariable "g" ;
rs:solution [ rs:binding [ rs:value <data-g1.ttl> ;
rs:variable "g"
]
] ;
rs:solution [ rs:binding [ rs:value <data-g2.ttl> ;
rs:variable "g"
]
] .
12 changes: 12 additions & 0 deletions sparql/sparql10/graph/manifest.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
:dawg-graph-09
:dawg-graph-10b
:dawg-graph-11
:graph-empty
).

:dawg-graph-01 rdf:type mf:QueryEvaluationTest ;
Expand Down Expand Up @@ -165,3 +166,14 @@
mf:result <graph-11.ttl> ;
.

:graph-empty rdf:type mf:QueryEvaluationTest ;
mf:name "graph-empty" ;
rdfs:comment "Graph with empty BGP: list all named graphs" ;
mf:action
[ qt:query <graph-empty.rq> ;
qt:data <data-g1.ttl> ;
qt:graphData <data-g1.ttl> ;
qt:graphData <data-g2.ttl> ;
] ;
mf:result <graph-empty.ttl> ;
.

0 comments on commit 0bbf230

Please sign in to comment.