From e5daef300bbc2505131a4fd724caaee7e7edfaf6 Mon Sep 17 00:00:00 2001 From: Jesse Wright <63333554+jeswr@users.noreply.github.com> Date: Mon, 2 Jan 2023 11:38:03 +1100 Subject: [PATCH] chore: add extra test case for nested nodes --- __tests__/valid/nestedShape3.shaclc | 15 +++++++++ __tests__/valid/nestedShape3.ttl | 48 +++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 __tests__/valid/nestedShape3.shaclc create mode 100644 __tests__/valid/nestedShape3.ttl diff --git a/__tests__/valid/nestedShape3.shaclc b/__tests__/valid/nestedShape3.shaclc new file mode 100644 index 0000000..d71bc07 --- /dev/null +++ b/__tests__/valid/nestedShape3.shaclc @@ -0,0 +1,15 @@ +BASE + +PREFIX ex: + +shape ex:TestShape { + ex:property IRI { + ex:nestedProperty [1..1] . + } . + ex:property2 IRI { + ex:nestedProperty2 [1..1] . + ex:property3 IRI { + ex:nestedProperty3 [1..1] . + } . + } . +} diff --git a/__tests__/valid/nestedShape3.ttl b/__tests__/valid/nestedShape3.ttl new file mode 100644 index 0000000..d6afccb --- /dev/null +++ b/__tests__/valid/nestedShape3.ttl @@ -0,0 +1,48 @@ +@base . +@prefix ex: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +<> + a owl:Ontology ; +. + +ex:TestShape + a sh:NodeShape ; + sh:property [ + sh:path ex:property ; + sh:nodeKind sh:IRI ; + sh:node [ + sh:property [ + sh:path ex:nestedProperty ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] ; + ] ; + ] ; + sh:property [ + sh:path ex:property2 ; + sh:nodeKind sh:IRI ; + sh:node [ + sh:property [ + sh:path ex:nestedProperty2 ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] ; + sh:property [ + sh:path ex:property3 ; + sh:nodeKind sh:IRI ; + sh:node [ + sh:property [ + sh:path ex:nestedProperty3 ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] + ] + ] ; + ] ; + ] ; +.