From 610f046d86d56cbc19cbffc9945ace217d0e14b5 Mon Sep 17 00:00:00 2001 From: Tpt Date: Wed, 24 May 2023 11:58:21 +0200 Subject: [PATCH] SPARQL 1.1: Adds tests for inverse properties inside NegatedPropertyTest This feature is in the specification but not covered by the testsuite --- sparql/sparql11/property-path/manifest.ttl | 17 +++++++++++++ .../property-path/nps_direct_and_inverse.rq | 4 +++ .../property-path/nps_direct_and_inverse.srx | 25 +++++++++++++++++++ .../property-path/nps_direct_and_inverse.ttl | 3 +++ sparql/sparql11/property-path/nps_inverse.rq | 4 +++ sparql/sparql11/property-path/nps_inverse.srx | 17 +++++++++++++ sparql/sparql11/property-path/nps_inverse.ttl | 3 +++ 7 files changed, 73 insertions(+) create mode 100644 sparql/sparql11/property-path/nps_direct_and_inverse.rq create mode 100644 sparql/sparql11/property-path/nps_direct_and_inverse.srx create mode 100644 sparql/sparql11/property-path/nps_direct_and_inverse.ttl create mode 100644 sparql/sparql11/property-path/nps_inverse.rq create mode 100644 sparql/sparql11/property-path/nps_inverse.srx create mode 100644 sparql/sparql11/property-path/nps_inverse.ttl diff --git a/sparql/sparql11/property-path/manifest.ttl b/sparql/sparql11/property-path/manifest.ttl index 9a72e900..2db528d0 100644 --- a/sparql/sparql11/property-path/manifest.ttl +++ b/sparql/sparql11/property-path/manifest.ttl @@ -39,6 +39,8 @@ :pp37 :values_and_path + :nps_inverse + :nps_direct_and_inverse ) . @@ -294,3 +296,18 @@ [ qt:query ; qt:data ] ; mf:result . + +:nps_inverse rdf:type mf:QueryEvaluationTest ; + mf:name "Negated Property Set with inverse properties" ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + + +:nps_direct_and_inverse rdf:type mf:QueryEvaluationTest ; + mf:name "Negated Property Set with both direct and inverse properties" ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . diff --git a/sparql/sparql11/property-path/nps_direct_and_inverse.rq b/sparql/sparql11/property-path/nps_direct_and_inverse.rq new file mode 100644 index 00000000..24f6d68f --- /dev/null +++ b/sparql/sparql11/property-path/nps_direct_and_inverse.rq @@ -0,0 +1,4 @@ +PREFIX ex: +SELECT ?s ?o WHERE { + ?s !(ex:pd|^ex:pr) ?o +} \ No newline at end of file diff --git a/sparql/sparql11/property-path/nps_direct_and_inverse.srx b/sparql/sparql11/property-path/nps_direct_and_inverse.srx new file mode 100644 index 00000000..1021d5a0 --- /dev/null +++ b/sparql/sparql11/property-path/nps_direct_and_inverse.srx @@ -0,0 +1,25 @@ + + + + + + + + + + http://example.org/od + + + http://example.org/sd + + + + + http://example.org/sr + + + http://example.org/or + + + + \ No newline at end of file diff --git a/sparql/sparql11/property-path/nps_direct_and_inverse.ttl b/sparql/sparql11/property-path/nps_direct_and_inverse.ttl new file mode 100644 index 00000000..cefe1a66 --- /dev/null +++ b/sparql/sparql11/property-path/nps_direct_and_inverse.ttl @@ -0,0 +1,3 @@ +@prefix ex: . +ex:sd ex:pd ex:od . +ex:sr ex:pr ex:or . diff --git a/sparql/sparql11/property-path/nps_inverse.rq b/sparql/sparql11/property-path/nps_inverse.rq new file mode 100644 index 00000000..da719eee --- /dev/null +++ b/sparql/sparql11/property-path/nps_inverse.rq @@ -0,0 +1,4 @@ +PREFIX ex: +SELECT ?s ?o WHERE { + ?s !^ex:pr ?o +} \ No newline at end of file diff --git a/sparql/sparql11/property-path/nps_inverse.srx b/sparql/sparql11/property-path/nps_inverse.srx new file mode 100644 index 00000000..0e4663f5 --- /dev/null +++ b/sparql/sparql11/property-path/nps_inverse.srx @@ -0,0 +1,17 @@ + + + + + + + + + + http://example.org/od + + + http://example.org/sd + + + + \ No newline at end of file diff --git a/sparql/sparql11/property-path/nps_inverse.ttl b/sparql/sparql11/property-path/nps_inverse.ttl new file mode 100644 index 00000000..cefe1a66 --- /dev/null +++ b/sparql/sparql11/property-path/nps_inverse.ttl @@ -0,0 +1,3 @@ +@prefix ex: . +ex:sd ex:pd ex:od . +ex:sr ex:pr ex:or .