Skip to content

Commit

Permalink
#144 Expansion against local contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
anatoly-scherbakov committed Jun 9, 2024
1 parent 8259248 commit 715a6cf
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/cases/local-context/context.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"@context": {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"schema": "https://schema.org/",
"$id": "@id",
"∈": "@type",
"$": "rdfs:label"
}
}
7 changes: 7 additions & 0 deletions tests/cases/local-context/context.yamlld
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"@context":
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
schema: https://schema.org/

$id: "@id"
∈: "@type"
$: rdfs:label
4 changes: 4 additions & 0 deletions tests/cases/local-context/jsonld-in.yamlld
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"@context": context.jsonld
$id: https://w3.org
∈: schema:Organization
$: The World Wide Web Consortium
Empty file.
4 changes: 4 additions & 0 deletions tests/cases/local-context/yamlld-in.yamlld
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"@context": context.yamlld
$id: https://w3.org
∈: schema:Organization
$: The World Wide Web Consortium
18 changes: 18 additions & 0 deletions tests/manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,24 @@
"option": {"extractAllScripts": false},
"input": "cases/streams/two-documents-in.yamlld",
"expect": "cases/streams/one-document-out.yamlld"
},
{
"@id": "#local-json-ld-context",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Load a context from a local file in JSON-LD format.",
"req": "must",
"option": {"extractAllScripts": false},
"input": "cases/local-context/jsonld-in.yamlld",
"expect": "cases/local-context/out.yamlld"
},
{
"@id": "#local-yaml-ld-context",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Load a context from a local file in YAML-LD format.",
"req": "must",
"option": {"extractAllScripts": false},
"input": "cases/local-context/yamlld-in.yamlld",
"expect": "cases/local-context/out.yamlld"
}
]
}

0 comments on commit 715a6cf

Please sign in to comment.