Skip to content

Commit 143e920

Browse files
committed
SPARQL tests rooted at /rdf-tests/sparql
1 parent 6d24f5b commit 143e920

File tree

1,942 files changed

+83080
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,942 files changed

+83080
-0
lines changed

sparql/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPARQL Test Suite
2+
3+
Community maintained at https://github.com/w3c/rdf-tests/sparql
4+
5+
This area contains the SPARQL test suites
6+
with updates agreed by the community.
7+
8+
* [sparql12](sparql12/) -- coming soon!
9+
* [sparql11](sparql11/)
10+
* [sparql10](sparql10/)
11+
12+
The original test from the working groups are:
13+
14+
* [sparql10](sparql10/) -- RDF Data Access WG (DAWG) -- http://www.w3.org/2001/sw/DataAccess/
15+
* [sparql11](sparql11/) -- SPARQL WG -- https://www.w3.org/groups/wg/sparql

sparql/sparql10/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
All tests materials are licensed under the W3C Software Notice and License, as follows:
2+
____________________________________
3+
W3C� SOFTWARE NOTICE AND LICENSE
4+
http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
5+
6+
This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license. By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
7+
8+
Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
9+
10+
1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
11+
2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
12+
3. Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
13+
14+
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
15+
16+
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
17+
18+
The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
19+
20+
____________________________________
21+

sparql/sparql10/README

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Data Access Working Group SPARQL Query Language test suite reorganization
2+
3+
This directory contains restructured copies of tests from
4+
the DAWG test suite (available at
5+
http://www.w3.org/2001/sw/DataAccess/tests/data/). The purpose of this
6+
restructuring is to enhance usability, clear away obsolete tests and
7+
provide an up-to-date, consistent and easy to use suite of test cases
8+
that SPARQL query language implementors can use to evaluate their
9+
implementation.
10+
11+
12+
The Working Group decided
13+
(http://lists.w3.org/Archives/Public/public-rdf-dawg/2007JulSep/att-0096/21-dawg-minutes.html#item05)
14+
on 21 Aug 2007 that the tests as-is constitute a test suite that the group will
15+
use to generate an implementation report for the SPARQL Query Language for
16+
RDF.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
I. LeftJoin(BGP(..),{..})
2+
II. Join(BGP(..),Graph(varOrIRI,{..}))
3+
III. Join(BGP(..),Union(..,..))
4+
IV. Graph(varOrIRI,{..})
5+
V. LeftJoin({},{..})
6+
VI. Union(..,..)
7+
VII. BGP(..)
8+
Join(I.,I.) => Join(LeftJoin(BGP(..),{..}),LeftJoin(BGP(..),{..}))
9+
Union(I.,I.) => Union(LeftJoin(BGP(..),{..}),LeftJoin(BGP(..),{..}))
10+
LeftJoin(I.,I.) => LeftJoin(LeftJoin(BGP(..),{..}),LeftJoin(BGP(..),{..}))
11+
Join(I.,II.) => Join(LeftJoin(BGP(..),{..}),Join(BGP(..),Graph(varOrIRI,{..})))
12+
Union(I.,II.) => Union(LeftJoin(BGP(..),{..}),Join(BGP(..),Graph(varOrIRI,{..})))
13+
LeftJoin(I.,II.) => LeftJoin(LeftJoin(BGP(..),{..}),Join(BGP(..),Graph(varOrIRI,{..})))
14+
Join(I.,III.) => Join(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..)))
15+
Union(I.,III.) => Union(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..)))
16+
LeftJoin(I.,III.) => LeftJoin(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..)))
17+
Join(I.,IV.) => Join(LeftJoin(BGP(..),{..}),Graph(varOrIRI,{..}))
18+
Union(I.,IV.) => Union(LeftJoin(BGP(..),{..}),Graph(varOrIRI,{..}))
19+
LeftJoin(I.,IV.) => LeftJoin(LeftJoin(BGP(..),{..}),Graph(varOrIRI,{..}))
20+
Join(I.,V.) => Join(LeftJoin(BGP(..),{..}),LeftJoin({},{..}))
21+
Union(I.,V.) => Union(LeftJoin(BGP(..),{..}),LeftJoin({},{..}))
22+
LeftJoin(I.,V.) => LeftJoin(LeftJoin(BGP(..),{..}),LeftJoin({},{..}))
23+
Join(I.,VI.) => Join(LeftJoin(BGP(..),{..}),Union(..,..))
24+
Union(I.,VI.) => Union(LeftJoin(BGP(..),{..}),Union(..,..))
25+
LeftJoin(I.,VI.) => LeftJoin(LeftJoin(BGP(..),{..}),Union(..,..))
26+
Join(I.,VII.) => Join(LeftJoin(BGP(..),{..}),BGP(..))
27+
Union(I.,VII.) => Union(LeftJoin(BGP(..),{..}),BGP(..))
28+
LeftJoin(I.,VII.) => LeftJoin(LeftJoin(BGP(..),{..}),BGP(..))
29+
LeftJoin(II.,I.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin(BGP(..),{..}))
30+
Join(II.,II.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Graph(varOrIRI,{..})))
31+
Union(II.,II.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Graph(varOrIRI,{..})))
32+
LeftJoin(II.,II.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Graph(varOrIRI,{..})))
33+
Join(II.,III.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Union(..,..)))
34+
Union(II.,III.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Union(..,..)))
35+
LeftJoin(II.,III.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Union(..,..)))
36+
Join(II.,IV.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Graph(varOrIRI,{..}))
37+
Union(II.,IV.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Graph(varOrIRI,{..}))
38+
LeftJoin(II.,IV.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Graph(varOrIRI,{..}))
39+
Join(II.,V.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin({},{..}))
40+
Union(II.,V.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin({},{..}))
41+
LeftJoin(II.,V.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin({},{..}))
42+
Join(II.,VI.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Union(..,..))
43+
Union(II.,VI.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Union(..,..))
44+
LeftJoin(II.,VI.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Union(..,..))
45+
Join(II.,VII.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),BGP(..))
46+
Union(II.,VII.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),BGP(..))
47+
LeftJoin(II.,VII.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),BGP(..))
48+
LeftJoin(III.,I.) => LeftJoin(Join(BGP(..),Union(..,..)),LeftJoin(BGP(..),{..}))
49+
LeftJoin(III.,II.) => LeftJoin(Join(BGP(..),Union(..,..)),Join(BGP(..),Graph(varOrIRI,{..})))
50+
Join(III.,III.) => Join(Join(BGP(..),Union(..,..)),Join(BGP(..),Union(..,..)))
51+
Union(III.,III.) => Union(Join(BGP(..),Union(..,..)),Join(BGP(..),Union(..,..)))
52+
LeftJoin(III.,III.) => LeftJoin(Join(BGP(..),Union(..,..)),Join(BGP(..),Union(..,..)))
53+
Join(III.,IV.) => Join(Join(BGP(..),Union(..,..)),Graph(varOrIRI,{..}))
54+
Union(III.,IV.) => Union(Join(BGP(..),Union(..,..)),Graph(varOrIRI,{..}))
55+
LeftJoin(III.,IV.) => LeftJoin(Join(BGP(..),Union(..,..)),Graph(varOrIRI,{..}))
56+
Join(III.,V.) => Join(Join(BGP(..),Union(..,..)),LeftJoin({},{..}))
57+
Union(III.,V.) => Union(Join(BGP(..),Union(..,..)),LeftJoin({},{..}))
58+
LeftJoin(III.,V.) => LeftJoin(Join(BGP(..),Union(..,..)),LeftJoin({},{..}))
59+
Join(III.,VI.) => Join(Join(BGP(..),Union(..,..)),Union(..,..))
60+
Union(III.,VI.) => Union(Join(BGP(..),Union(..,..)),Union(..,..))
61+
LeftJoin(III.,VI.) => LeftJoin(Join(BGP(..),Union(..,..)),Union(..,..))
62+
Join(III.,VII.) => Join(Join(BGP(..),Union(..,..)),BGP(..))
63+
Union(III.,VII.) => Union(Join(BGP(..),Union(..,..)),BGP(..))
64+
LeftJoin(III.,VII.) => LeftJoin(Join(BGP(..),Union(..,..)),BGP(..))
65+
LeftJoin(IV.,I.) => LeftJoin(Graph(varOrIRI,{..}),LeftJoin(BGP(..),{..}))
66+
LeftJoin(IV.,II.) => LeftJoin(Graph(varOrIRI,{..}),Join(BGP(..),Graph(varOrIRI,{..})))
67+
LeftJoin(IV.,III.) => LeftJoin(Graph(varOrIRI,{..}),Join(BGP(..),Union(..,..)))
68+
Join(IV.,IV.) => Join(Graph(varOrIRI,{..}),Graph(varOrIRI,{..}))
69+
Union(IV.,IV.) => Union(Graph(varOrIRI,{..}),Graph(varOrIRI,{..}))
70+
LeftJoin(IV.,IV.) => LeftJoin(Graph(varOrIRI,{..}),Graph(varOrIRI,{..}))
71+
Join(IV.,V.) => Join(Graph(varOrIRI,{..}),LeftJoin({},{..}))
72+
Union(IV.,V.) => Union(Graph(varOrIRI,{..}),LeftJoin({},{..}))
73+
LeftJoin(IV.,V.) => LeftJoin(Graph(varOrIRI,{..}),LeftJoin({},{..}))
74+
Join(IV.,VI.) => Join(Graph(varOrIRI,{..}),Union(..,..))
75+
Union(IV.,VI.) => Union(Graph(varOrIRI,{..}),Union(..,..))
76+
LeftJoin(IV.,VI.) => LeftJoin(Graph(varOrIRI,{..}),Union(..,..))
77+
Join(IV.,VII.) => Join(Graph(varOrIRI,{..}),BGP(..))
78+
Union(IV.,VII.) => Union(Graph(varOrIRI,{..}),BGP(..))
79+
LeftJoin(IV.,VII.) => LeftJoin(Graph(varOrIRI,{..}),BGP(..))
80+
LeftJoin(V.,I.) => LeftJoin(LeftJoin({},{..}),LeftJoin(BGP(..),{..}))
81+
LeftJoin(V.,II.) => LeftJoin(LeftJoin({},{..}),Join(BGP(..),Graph(varOrIRI,{..})))
82+
LeftJoin(V.,III.) => LeftJoin(LeftJoin({},{..}),Join(BGP(..),Union(..,..)))
83+
LeftJoin(V.,IV.) => LeftJoin(LeftJoin({},{..}),Graph(varOrIRI,{..}))
84+
Join(V.,V.) => Join(LeftJoin({},{..}),LeftJoin({},{..}))
85+
Union(V.,V.) => Union(LeftJoin({},{..}),LeftJoin({},{..}))
86+
LeftJoin(V.,V.) => LeftJoin(LeftJoin({},{..}),LeftJoin({},{..}))
87+
Join(V.,VI.) => Join(LeftJoin({},{..}),Union(..,..))
88+
Union(V.,VI.) => Union(LeftJoin({},{..}),Union(..,..))
89+
LeftJoin(V.,VI.) => LeftJoin(LeftJoin({},{..}),Union(..,..))
90+
Join(V.,VII.) => Join(LeftJoin({},{..}),BGP(..))
91+
Union(V.,VII.) => Union(LeftJoin({},{..}),BGP(..))
92+
LeftJoin(V.,VII.) => LeftJoin(LeftJoin({},{..}),BGP(..))
93+
LeftJoin(VI.,I.) => LeftJoin(Union(..,..),LeftJoin(BGP(..),{..}))
94+
LeftJoin(VI.,II.) => LeftJoin(Union(..,..),Join(BGP(..),Graph(varOrIRI,{..})))
95+
LeftJoin(VI.,III.) => LeftJoin(Union(..,..),Join(BGP(..),Union(..,..)))
96+
LeftJoin(VI.,IV.) => LeftJoin(Union(..,..),Graph(varOrIRI,{..}))
97+
LeftJoin(VI.,V.) => LeftJoin(Union(..,..),LeftJoin({},{..}))
98+
Join(VI.,VI.) => Join(Union(..,..),Union(..,..))
99+
Union(VI.,VI.) => Union(Union(..,..),Union(..,..))
100+
LeftJoin(VI.,VI.) => LeftJoin(Union(..,..),Union(..,..))
101+
Join(VI.,VII.) => Join(Union(..,..),BGP(..))
102+
Union(VI.,VII.) => Union(Union(..,..),BGP(..))
103+
LeftJoin(VI.,VII.) => LeftJoin(Union(..,..),BGP(..))
104+
LeftJoin(VII.,I.) => LeftJoin(BGP(..),LeftJoin(BGP(..),{..}))
105+
LeftJoin(VII.,II.) => LeftJoin(BGP(..),Join(BGP(..),Graph(varOrIRI,{..})))
106+
LeftJoin(VII.,III.) => LeftJoin(BGP(..),Join(BGP(..),Union(..,..)))
107+
LeftJoin(VII.,IV.) => LeftJoin(BGP(..),Graph(varOrIRI,{..}))
108+
LeftJoin(VII.,V.) => LeftJoin(BGP(..),LeftJoin({},{..}))
109+
LeftJoin(VII.,VI.) => LeftJoin(BGP(..),Union(..,..))
110+
Join(VII.,VII.) => Join(BGP(..),BGP(..))
111+
Union(VII.,VII.) => Union(BGP(..),BGP(..))
112+
LeftJoin(VII.,VII.) => LeftJoin(BGP(..),BGP(..))

sparql/sparql10/algebra/data-1.ttl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@prefix : <http://example/> .
2+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
3+
4+
:x :p "1"^^xsd:integer .
5+

sparql/sparql10/algebra/data-2.ttl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@prefix : <http://example/> .
2+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
3+
4+
:x :p "1"^^xsd:integer .
5+
:x :p "2"^^xsd:integer .
6+
:x :p "3"^^xsd:integer .
7+
:x :p "4"^^xsd:integer .
8+
9+
:x :q "1"^^xsd:integer .
10+
:x :q "2"^^xsd:integer .
11+
:x :q "3"^^xsd:integer .
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
PREFIX : <http://example/>
2+
3+
SELECT ?v
4+
{ :x :p ?v . FILTER(?v = 1) }
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0"?>
2+
<sparql
3+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4+
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
5+
xmlns="http://www.w3.org/2005/sparql-results#" >
6+
<head>
7+
<variable name="v"/>
8+
</head>
9+
<results>
10+
<result>
11+
<binding name="v">
12+
<literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal>
13+
</binding>
14+
</result>
15+
</results>
16+
</sparql>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
PREFIX : <http://example/>
2+
3+
SELECT ?v
4+
{ :x :p ?v . { FILTER(?v = 1) } }
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0"?>
2+
<sparql
3+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4+
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
5+
xmlns="http://www.w3.org/2005/sparql-results#" >
6+
<head>
7+
<variable name="v"/>
8+
</head>
9+
<results>
10+
</results>
11+
</sparql>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
PREFIX : <http://example/>
2+
3+
SELECT ?v
4+
{
5+
?s :p ?v .
6+
FILTER (?v = 2)
7+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0"?>
2+
<sparql
3+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4+
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
5+
xmlns="http://www.w3.org/2005/sparql-results#" >
6+
<head>
7+
<variable name="v"/>
8+
</head>
9+
<results>
10+
<result>
11+
<binding name="v">
12+
<literal datatype="http://www.w3.org/2001/XMLSchema#integer">2</literal>
13+
</binding>
14+
</result>
15+
</results>
16+
</sparql>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
PREFIX : <http://example/>
2+
3+
SELECT ?v
4+
{
5+
FILTER (?v = 2)
6+
?s :p ?v .
7+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0"?>
2+
<sparql
3+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4+
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
5+
xmlns="http://www.w3.org/2005/sparql-results#" >
6+
<head>
7+
<variable name="v"/>
8+
</head>
9+
<results>
10+
<result>
11+
<binding name="v">
12+
<literal datatype="http://www.w3.org/2001/XMLSchema#integer">2</literal>
13+
</binding>
14+
</result>
15+
</results>
16+
</sparql>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
PREFIX : <http://example/>
2+
3+
SELECT ?v ?w
4+
{
5+
FILTER (?v = 2)
6+
FILTER (?w = 3)
7+
?s :p ?v .
8+
?s :q ?w .
9+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0"?>
2+
<sparql
3+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4+
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
5+
xmlns="http://www.w3.org/2005/sparql-results#" >
6+
<head>
7+
<variable name="v"/>
8+
<variable name="w"/>
9+
</head>
10+
<results>
11+
<result>
12+
<binding name="v">
13+
<literal datatype="http://www.w3.org/2001/XMLSchema#integer">2</literal>
14+
</binding>
15+
<binding name="w">
16+
<literal datatype="http://www.w3.org/2001/XMLSchema#integer">3</literal>
17+
</binding>
18+
</result>
19+
</results>
20+
</sparql>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
PREFIX : <http://example/>
2+
3+
SELECT *
4+
{
5+
:x :p ?v .
6+
{ :x :q ?w
7+
OPTIONAL { :x :p ?v2 FILTER(?v = 1) }
8+
}
9+
}

0 commit comments

Comments
 (0)