aboutsummaryrefslogtreecommitdiffstats
path: root/test/extra
diff options
context:
space:
mode:
Diffstat (limited to 'test/extra')
-rw-r--r--test/extra/filter/input.ttl9
-rw-r--r--test/extra/filter/manifest.ttl48
-rw-r--r--test/extra/filter/meson.build17
-rw-r--r--test/extra/filter/o1.pattern.nt1
-rw-r--r--test/extra/filter/o1.result.nt2
-rw-r--r--test/extra/filter/p1.pattern.nt1
-rw-r--r--test/extra/filter/p1.result.nt2
-rw-r--r--test/extra/filter/s1.pattern.nt1
-rw-r--r--test/extra/filter/s1.result.nt2
9 files changed, 83 insertions, 0 deletions
diff --git a/test/extra/filter/input.ttl b/test/extra/filter/input.ttl
new file mode 100644
index 00000000..59aa67f7
--- /dev/null
+++ b/test/extra/filter/input.ttl
@@ -0,0 +1,9 @@
+@prefix eg: <http://example.org/> .
+
+eg:s1
+ eg:p1 eg:o1 ;
+ eg:p2 eg:o2 .
+
+eg:s2
+ eg:p1 eg:o1 ;
+ eg:p2 eg:o2 .
diff --git a/test/extra/filter/manifest.ttl b/test/extra/filter/manifest.ttl
new file mode 100644
index 00000000..6ac5cec8
--- /dev/null
+++ b/test/extra/filter/manifest.ttl
@@ -0,0 +1,48 @@
+@prefix checks: <http://drobilla.net/ns/serd/checks#> .
+@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rdft: <http://www.w3.org/ns/rdftest#> .
+@prefix serd: <http://drobilla.net/ns/serd#> .
+
+serd:TestFilterPositive
+ a rdfs:Class ;
+ rdfs:label "Positive Filtering" ;
+ rdfs:subClassOf rdft:Test .
+
+serd:patternFile
+ a rdf:Property ;
+ rdfs:label "pattern file" .
+
+rdft:Test
+ rdfs:subClassOf mf:ManifestEntry .
+
+<>
+ a mf:Manifest ;
+ rdfs:comment "Serd statement filtering test suite" ;
+ mf:entries (
+ <#o1>
+ <#p1>
+ <#s1>
+ ) .
+
+<#o1>
+ a serd:TestFilterPositive ;
+ serd:patternFile <o1.pattern.nt> ;
+ mf:action <input.ttl> ;
+ mf:name "o1" ;
+ mf:result <o1.result.nt> .
+
+<#p1>
+ a serd:TestFilterPositive ;
+ serd:patternFile <p1.pattern.nt> ;
+ mf:action <input.ttl> ;
+ mf:name "p1" ;
+ mf:result <p1.result.nt> .
+
+<#s1>
+ a serd:TestFilterPositive ;
+ serd:patternFile <s1.pattern.nt> ;
+ mf:action <input.ttl> ;
+ mf:name "s1" ;
+ mf:result <s1.result.nt> .
diff --git a/test/extra/filter/meson.build b/test/extra/filter/meson.build
new file mode 100644
index 00000000..f03c7130
--- /dev/null
+++ b/test/extra/filter/meson.build
@@ -0,0 +1,17 @@
+base_uri = 'http://drobilla.net/sw/serd/test/filter/'
+
+test(
+ 'filter',
+ run_filter_suite,
+ args: common_script_args + [
+ '--pipe',
+ serd_pipe,
+ '--filter',
+ serd_filter,
+ files('manifest.ttl'),
+ base_uri,
+ ],
+ env: test_env,
+ suite: ['suite', 'extra'],
+ timeout: 240,
+)
diff --git a/test/extra/filter/o1.pattern.nt b/test/extra/filter/o1.pattern.nt
new file mode 100644
index 00000000..41932fd7
--- /dev/null
+++ b/test/extra/filter/o1.pattern.nt
@@ -0,0 +1 @@
+?s ?p <http://example.org/o1> .
diff --git a/test/extra/filter/o1.result.nt b/test/extra/filter/o1.result.nt
new file mode 100644
index 00000000..e7b1e759
--- /dev/null
+++ b/test/extra/filter/o1.result.nt
@@ -0,0 +1,2 @@
+<http://example.org/s1> <http://example.org/p1> <http://example.org/o1> .
+<http://example.org/s2> <http://example.org/p1> <http://example.org/o1> .
diff --git a/test/extra/filter/p1.pattern.nt b/test/extra/filter/p1.pattern.nt
new file mode 100644
index 00000000..fca20e94
--- /dev/null
+++ b/test/extra/filter/p1.pattern.nt
@@ -0,0 +1 @@
+?s <http://example.org/p1> ?o .
diff --git a/test/extra/filter/p1.result.nt b/test/extra/filter/p1.result.nt
new file mode 100644
index 00000000..e7b1e759
--- /dev/null
+++ b/test/extra/filter/p1.result.nt
@@ -0,0 +1,2 @@
+<http://example.org/s1> <http://example.org/p1> <http://example.org/o1> .
+<http://example.org/s2> <http://example.org/p1> <http://example.org/o1> .
diff --git a/test/extra/filter/s1.pattern.nt b/test/extra/filter/s1.pattern.nt
new file mode 100644
index 00000000..f5b87db1
--- /dev/null
+++ b/test/extra/filter/s1.pattern.nt
@@ -0,0 +1 @@
+<http://example.org/s1> ?p ?o .
diff --git a/test/extra/filter/s1.result.nt b/test/extra/filter/s1.result.nt
new file mode 100644
index 00000000..023faf42
--- /dev/null
+++ b/test/extra/filter/s1.result.nt
@@ -0,0 +1,2 @@
+<http://example.org/s1> <http://example.org/p1> <http://example.org/o1> .
+<http://example.org/s1> <http://example.org/p2> <http://example.org/o2> .