This is a follow-up issue to my comment in #243 (comment).
Here's a list of compliance tests I came up with, for review. If they don't contain any mistakes I plan on eventually creating a PR for each individual one:
Relative IRI
Dataset
default
Query
BASE <http://example.com/xxx/abc>
SELECT (<> AS ?res0) (<def> AS ?res1) (<#ghi> AS ?res2) (<./jkl> AS ?res3) (<../mno> AS ?res4) (</pqr> AS ?res5) {}
Expected Result
?res0 ?res1 ?res2 ?res3 ?res4 ?res5
<http://example.com/xxx/abc> <http://example.com/xxx/def> <http://example.com/xxx/abc#ghi> <http://example.com/xxx/jkl> <http://example.com/mno> <http://example.com/pqr>
Language Tags case insensitivity
Dataset
default
Query
SELECT (""@en = ""@EN AS ?res0) (LANG(""@en) = LANG(""@EN) AS ?res1) (STRLANG("", "en") = STRLANG("", "EN") AS ?res2) {}
Expected Result
?res0 ?res1 ?res2
true true true
Nested Graphs 1
Dataset
default
graph1.ttl
@prefix : <http://example.com/> .
:s :p :o
:s1 :p :o1
graph2.ttl
@prefix : <http://example.com/> .
:s :p :o
:s2 :p :o2
Query
PREFIX : <http://example.com/>
SELECT ?s ?o WHERE {
GRAPH ?g {
GRAPH ?g {
?s :p ?o
}
}
}
ORDER BY ?s ?o
Expected Result
?s ?o
<http://example.com/s> <http://example.com/o>
<http://example.com/s> <http://example.com/o>
<http://example.com/s1> <http://example.com/o1>
<http://example.com/s2> <http://example.com/o2>
Nested Graphs 2
Dataset
default
graph1.ttl
@prefix : <http://example.com/> .
:s :p :o
:s1 :p :o1
graph2.ttl
@prefix : <http://example.com/> .
:s :p :o
:s2 :p :o2
Query
PREFIX : <http://example.com/>
SELECT ?s ?o WHERE {
GRAPH ?g1 {
GRAPH ?g0 {
?s :p ?o
}
}
}
ORDER BY ?s ?o
Expected Result
?s ?o
<http://example.com/s> <http://example.com/o>
<http://example.com/s> <http://example.com/o>
<http://example.com/s> <http://example.com/o>
<http://example.com/s> <http://example.com/o>
<http://example.com/s1> <http://example.com/o1>
<http://example.com/s1> <http://example.com/o1>
<http://example.com/s2> <http://example.com/o2>
<http://example.com/s2> <http://example.com/o2>
Nested Graphs 3
Dataset
default
graph1.ttl
@prefix : <http://example.com/> .
:s :p :o
:s1 :p :o1
graph2.ttl
@prefix : <http://example.com/> .
:s :p :o
:s2 :p :o2
Query
PREFIX : <http://example.com/>
SELECT ?s ?o WHERE {
GRAPH ?g {
GRAPH <graph1.ttl> {
?s :p ?o
}
}
}
ORDER BY ?s ?o
Expected Result
?s ?o
<http://example.com/s> http://example.com/o>
<http://example.com/s> http://example.com/o>
<http://example.com/s1> http://example.com/o1>
<http://example.com/s1> http://example.com/o1>
Nested Graphs 4
Dataset
default
graph1.ttl
@prefix : <http://example.com/> .
:s :p :o
:s1 :p :o1
graph2.ttl
@prefix : <http://example.com/> .
:s :p :o
:s2 :p :o2
Query
PREFIX : <http://example.com/>
SELECT ?s ?o WHERE {
GRAPH <graph1.ttl> {
GRAPH ?g {
?s :p ?o
}
}
}
ORDER BY ?s ?o
Expected Result
?s ?o
<http://example.com/s> <http://example.com/o>
<http://example.com/s> <http://example.com/o>
<http://example.com/s1> <http://example.com/o1>
<http://example.com/s2> <http://example.com/o2>
Graph with VALUES
Dataset
default
graph1.ttl
graph2.ttl
Query
SELECT ?x ?g WHERE {
GRAPH ?g {
VALUES ?x { 1 2 }
}
}
ORDER BY ?x ?g
Expected Result
?x ?g
1 <graph1.ttl>
1 <graph2.ttl>
2 <graph1.ttl>
2 <graph2.ttl>
Graph with LIMIT/OFFSET with VALUES
Dataset
default
graph1.ttl
graph2.ttl
Query
PREFIX : <http://example.com/>
SELECT ?x WHERE {
GRAPH ?g {
SELECT ?x {
VALUES ?x { 1 2 3 }
}
ORDER BY ?x
OFFSET 1
LIMIT 1
}
}
Expected Result
Graph with LIMIT/OFFSET
Dataset
default
graph1.ttl
@prefix : <http://example.com/> .
:s :p :o
:s1 :p :o1
:s1 :p :o2
:s1 :p :o3
graph2.ttl
@prefix : <http://example.com/> .
:s :p :o
:s2 :p :o1
:s2 :p :o2
graph3.ttl
@prefix : <http://example.com/> .
:s :p :o
Query
PREFIX : <http://example.com/>
SELECT ?s ?o WHERE {
GRAPH ?g {
SELECT ?s ?o {
?s :p ?o
}
ORDER BY ?s ?o
OFFSET 1
LIMIT 2
}
}
ORDER BY ?s ?o
Expected Result
?s ?o
<http://example.com/s1> <http://example.com/o1>
<http://example.com/s1> <http://example.com/o2>
<http://example.com/s2> <http://example.com/o1>
<http://example.com/s2> <http://example.com/o2>
This is a follow-up issue to my comment in #243 (comment).
Here's a list of compliance tests I came up with, for review. If they don't contain any mistakes I plan on eventually creating a PR for each individual one:
Relative IRI
Dataset
defaultQuery
Expected Result
Language Tags case insensitivity
Dataset
defaultQuery
Expected Result
Nested Graphs 1
Dataset
defaultgraph1.ttlgraph2.ttlQuery
Expected Result
Nested Graphs 2
Dataset
defaultgraph1.ttlgraph2.ttlQuery
Expected Result
Nested Graphs 3
Dataset
defaultgraph1.ttlgraph2.ttlQuery
Expected Result
Nested Graphs 4
Dataset
defaultgraph1.ttlgraph2.ttlQuery
Expected Result
Graph with VALUES
Dataset
defaultgraph1.ttlgraph2.ttlQuery
Expected Result
Graph with LIMIT/OFFSET with VALUES
Dataset
defaultgraph1.ttlgraph2.ttlQuery
Expected Result
Graph with LIMIT/OFFSET
Dataset
defaultgraph1.ttlgraph2.ttlgraph3.ttlQuery
Expected Result