Skip to content

Commit f3eea09

Browse files
committed
Initial SRL tests
1 parent 7d17a61 commit f3eea09

25 files changed

Lines changed: 255 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PREFIX : <http://example/>
2+
3+
:s :p :o .
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
PREFIX : <http://example/>
2+
3+
:s :p :z .
4+
:z :q :o .
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Empty graph
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PREFIX : <http://example/>
2+
3+
RULE { :x :q ?o } WHERE { :s :p ?o }
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
PREFIX : <http://example/>
2+
3+
RULE { :x :q ?o } WHERE { :s :p ?z . ?z :q ?o }
4+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
PREFIX : <http://example/>
2+
3+
## ## Data graph
4+
## :s :p :o
5+
##
6+
## ## Inferred
7+
## :x :q :o
8+
##
9+
## ## Output graph
10+
## :s :p :o
11+
## :x :q :o
12+
13+
:x :q :o .
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PREFIX : <http://example/>
2+
3+
:x :q :o
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
## [1] https://www.w3.org/Consortium/Legal/2008/04-testsuite-license
2+
## [2] https://www.w3.org/Consortium/Legal/2008/03-bsd-license
3+
4+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
5+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
6+
PREFIX mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>
7+
PREFIX rdft: <http://www.w3.org/ns/rdftest#>
8+
9+
PREFIX : <https://w3c.github.io/rdf-tests/shacl/shacl12/>
10+
11+
PREFIX srt: <http://www.w3.org/ns/shacl-rules-test#>
12+
13+
PREFIX dct: <http://purl.org/dc/terms/>
14+
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
15+
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
16+
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
17+
18+
19+
20+
<#> rdf:type mf:Manifest ;
21+
rdfs:label "SHACL 1.2 Rules Evaluation Tests"@en ;
22+
mf:assumedTestBase <https://w3c.github.io/rdf-tests/shacl/shacl12/> ;
23+
# dct:issued "2023-07-20"^^xsd:date ;
24+
# dct:modified "2023-07-20"^^xsd:date ;
25+
# dct:licence
26+
# dct:creator [ foaf:homepage <https://w3c.github.io/rdf-star-wg/> ; foaf:name "W3C Data Shapes Working Group" ] ;
27+
28+
mf:entries
29+
(
30+
:eval-01
31+
:eval-02
32+
) .
33+
34+
## Good Evaluation
35+
36+
:eval-01 rdf:type srt:RulesEvalTest ;
37+
mf:name "Eval-basic-1";
38+
mf:action
39+
[ srt:ruleset <eval-basic-01.srl> ;
40+
srt:data <data-01.ttl> ] ;
41+
mf:result <eval-results-basic-01.ttl> ;
42+
.
43+
44+
:eval-02 rdf:type srt:RulesEvalTest ;
45+
mf:name "Eval-basic-2";
46+
mf:action
47+
[ srt:ruleset <eval-basic-02.srl> ;
48+
srt:data <data-02.ttl> ] ;
49+
mf:result <eval-results-basic-02.ttl> ;
50+
.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## [1] https://www.w3.org/Consortium/Legal/2008/04-testsuite-license
2+
## [2] https://www.w3.org/Consortium/Legal/2008/03-bsd-license
3+
4+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
5+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
6+
PREFIX mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>
7+
PREFIX rdft: <http://www.w3.org/ns/rdftest#>
8+
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
9+
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
10+
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
11+
12+
<> rdf:type mf:Manifest ;
13+
rdfs:label "SHACL Rules tests"@en ;
14+
mf:assumedTestBase <https://w3c.github.io/rdf-tests/shacl/shacl-1.2/> ;
15+
#dct:issued ""^^xsd:date ;
16+
rdfs:seeAlso <https://w3c.github.io/rdf-tests/> ;
17+
#dct:modified "2023-10-28"^^xsd:date ;
18+
#dct:licence <https://www.w3.org/Consortium/Legal/2008/03-bsd-license> ;
19+
#dct:creator [ foaf:homepage <https://w3c.github.io/data-shapes-wg/> ; foaf:name "W3C Data Shapes Working Group" ] ;
20+
21+
rdfs:comment """
22+
These test suites are a product of the [W3C Data Shapes Working Group]()
23+
and have been maintained by the
24+
[RDF Test Curation Community Group](https://www.w3.org/community/rdf-tests/)
25+
at [https://github.com/w3c/rdf-tests/tree/main/rdf/rdf11](https://github.com/w3c/rdf-tests/tree/main/rdf/rdf11/).
26+
""";
27+
mf:include (
28+
<syntax/manifest.ttl>
29+
<eval/manifest.ttl>
30+
) .
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
## [1] https://www.w3.org/Consortium/Legal/2008/04-testsuite-license
2+
## [2] https://www.w3.org/Consortium/Legal/2008/03-bsd-license
3+
4+
PREFIX : <manifest#>
5+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
6+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
7+
PREFIX mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>
8+
PREFIX srl: <http://www.w3.org/ns/shacl-rules#>
9+
PREFIX srt: <http://www.w3.org/ns/shacl-rules-test#>
10+
11+
<> rdf:type mf:Manifest ;
12+
rdfs:comment "Syntax tests SHACL Rules - Syntax" ;
13+
mf:entries (
14+
:test_1
15+
:test_2
16+
:test_3
17+
:test_4
18+
:test_5
19+
:test_6
20+
:test_7
21+
:test_8
22+
:test_9
23+
:test_10
24+
:test_11
25+
:test_12
26+
:test_13
27+
:test_14
28+
:test_15
29+
) .
30+
31+
:test_1 rdf:type srt:RulesPositiveSyntaxTest ;
32+
mf:name "syntax-rule-empty-01.srl" ;
33+
mf:action <syntax-rule-empty-01.srl> ;
34+
.
35+
36+
:test_2 rdf:type srt:RulesPositiveSyntaxTest ;
37+
mf:name "syntax-rule-empty-02.srl" ;
38+
mf:action <syntax-rule-empty-02.srl> ;
39+
.
40+
41+
:test_3 rdf:type srt:RulesPositiveSyntaxTest ;
42+
mf:name "syntax-rule-01.srl" ;
43+
mf:action <syntax-rule-01.srl> ;
44+
.
45+
46+
:test_4 rdf:type srt:RulesPositiveSyntaxTest ;
47+
mf:name "syntax-rule-02.srl" ;
48+
mf:action <syntax-rule-02.srl> ;
49+
.
50+
51+
:test_5 rdf:type srt:RulesPositiveSyntaxTest ;
52+
mf:name "syntax-rule-03.srl" ;
53+
mf:action <syntax-rule-03.srl> ;
54+
.
55+
56+
:test_6 rdf:type srt:RulesPositiveSyntaxTest ;
57+
mf:name "syntax-rule-04.srl" ;
58+
mf:action <syntax-rule-04.srl> ;
59+
.
60+
61+
:test_7 rdf:type srt:RulesPositiveSyntaxTest ;
62+
mf:name "syntax-rule-05.srl" ;
63+
mf:action <syntax-rule-05.srl> ;
64+
.
65+
66+
:test_8 rdf:type srt:RulesPositiveSyntaxTest ;
67+
mf:name "syntax-rule-06.srl" ;
68+
mf:action <syntax-rule-06.srl> ;
69+
.
70+
71+
:test_9 rdf:type srt:RulesPositiveSyntaxTest ;
72+
mf:name "syntax-rule-07.srl" ;
73+
mf:action <syntax-rule-07.srl> ;
74+
.
75+
76+
:test_10 rdf:type srt:RulesPositiveSyntaxTest ;
77+
mf:name "syntax-rule-08.srl" ;
78+
mf:action <syntax-rule-08.srl> ;
79+
.
80+
81+
:test_11 rdf:type srt:RulesPositiveSyntaxTest ;
82+
mf:name "syntax-rule-09.srl" ;
83+
mf:action <syntax-rule-09.srl> ;
84+
.
85+
86+
:test_12 rdf:type srt:RulesNegativeSyntaxTest ;
87+
mf:name "syntax-rule-bad-01.srl" ;
88+
mf:action <syntax-rule-bad-01.srl> ;
89+
.
90+
91+
:test_13 rdf:type srt:RulesNegativeSyntaxTest ;
92+
mf:name "syntax-rule-bad-02.srl" ;
93+
mf:action <syntax-rule-bad-02.srl> ;
94+
.
95+
96+
:test_14 rdf:type srt:RulesNegativeSyntaxTest ;
97+
mf:name "syntax-rule-bad-03.srl" ;
98+
mf:action <syntax-rule-bad-03.srl> ;
99+
.
100+
101+
:test_15 rdf:type srt:RulesNegativeSyntaxTest ;
102+
mf:name "syntax-rule-bad-04.srl" ;
103+
mf:action <syntax-rule-bad-04.srl> ;
104+
.

0 commit comments

Comments
 (0)