From a633911c4c3cc354812a0c3e0f41ac1b280056e0 Mon Sep 17 00:00:00 2001 From: Anatoly Scherbakov Date: Sun, 30 Jun 2024 11:07:46 +0400 Subject: [PATCH] =?UTF-8?q?=E2=9E=95=20`#frame-t0001`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/cases/frame/0001-frame.yamlld | 8 ++++++++ tests/cases/frame/0001-in.yamlld | 18 ++++++++++++++++++ tests/cases/frame/0001-out.yamlld | 16 ++++++++++++++++ tests/manifest.jsonld | 9 +++++++++ 4 files changed, 51 insertions(+) create mode 100644 tests/cases/frame/0001-frame.yamlld create mode 100644 tests/cases/frame/0001-in.yamlld create mode 100644 tests/cases/frame/0001-out.yamlld diff --git a/tests/cases/frame/0001-frame.yamlld b/tests/cases/frame/0001-frame.yamlld new file mode 100644 index 0000000..6793306 --- /dev/null +++ b/tests/cases/frame/0001-frame.yamlld @@ -0,0 +1,8 @@ +"@context": + dcterms: http://purl.org/dc/terms/ + ex: http://example.org/vocab# +"@type": ex:Library +ex:contains: + "@type": ex:Book + ex:contains: + "@type": ex:Chapter diff --git a/tests/cases/frame/0001-in.yamlld b/tests/cases/frame/0001-in.yamlld new file mode 100644 index 0000000..e57fc87 --- /dev/null +++ b/tests/cases/frame/0001-in.yamlld @@ -0,0 +1,18 @@ +"@context": + dcterms: http://purl.org/dc/terms/ + ex: http://example.org/vocab# + ex:contains: + "@type": "@id" +"@graph": +- "@id": http://example.org/test/#library + "@type": ex:Library + ex:contains: http://example.org/test#book +- "@id": http://example.org/test#book + "@type": ex:Book + dcterms:contributor: Writer + dcterms:title: My Book + ex:contains: http://example.org/test#chapter +- "@id": http://example.org/test#chapter + "@type": ex:Chapter + dcterms:description: Fun + dcterms:title: Chapter One diff --git a/tests/cases/frame/0001-out.yamlld b/tests/cases/frame/0001-out.yamlld new file mode 100644 index 0000000..0bf73f6 --- /dev/null +++ b/tests/cases/frame/0001-out.yamlld @@ -0,0 +1,16 @@ +"@context": + dcterms: http://purl.org/dc/terms/ + ex: http://example.org/vocab# +"@graph": +- "@id": http://example.org/test/#library + "@type": ex:Library + ex:contains: + "@id": http://example.org/test#book + "@type": ex:Book + dcterms:contributor: Writer + dcterms:title: My Book + ex:contains: + "@id": http://example.org/test#chapter + "@type": ex:Chapter + dcterms:description: Fun + dcterms:title: Chapter One diff --git a/tests/manifest.jsonld b/tests/manifest.jsonld index 18be1c3..2f0155f 100644 --- a/tests/manifest.jsonld +++ b/tests/manifest.jsonld @@ -283,6 +283,15 @@ "input": "cases/flatten/0044-in.yamlld", "context": "cases/flatten/0044-context.yamlld", "expect": "cases/flatten/0044-out.yamlld" + }, + { + "@id": "#frame-t0001", + "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], + "name": "Library framing example", + "purpose": "Basic example used in playground and spec examples.", + "input": "frame/0001-in.yamlld", + "frame": "frame/0001-frame.yamlld", + "expect": "frame/0001-out.yamlld" } ] }