Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tests for @json field testcase in framing #144

Merged
merged 3 commits into from
Dec 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions tests/frame-manifest.html
Original file line number Diff line number Diff line change
Expand Up @@ -2249,6 +2249,38 @@ <h2>
</dd>
</dl>
</dd>
<dt id='t0069'>
Test t0069 Tests @json in framing
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#t0069</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:FrameTest</dd>
<dt>Purpose</dt>
<dd>Test collection to better define what is expected when framing over a `@json` field..</dd>
<dt>input</dt>
<dd>
<a href='frame/0069-in.jsonld'>frame/0069-in.jsonld</a>
</dd>
<dt>frame</dt>
<dd>
<a href='frame/0069-frame.jsonld'>frame/0069-frame.jsonld</a>
</dd>
<dt>expect</dt>
<dd>
<a href='frame/0069-out.jsonld'>frame/0069-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='teo01'>
Test teo01 @embed true/false
</dt>
Expand Down
9 changes: 9 additions & 0 deletions tests/frame-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,15 @@
"frame": "frame/0068-frame.jsonld",
"expect": "frame/0068-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#t0069",
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
"name": "Tests @json in framing",
"purpose": "Test collection to better define what is expected when framing over a `@json` field..",
"input": "frame/0069-in.jsonld",
"frame": "frame/0069-frame.jsonld",
"expect": "frame/0069-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#teo01",
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
Expand Down
10 changes: 10 additions & 0 deletions tests/frame/0069-frame.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"@context": {
"ex": "http://example.org/vocab#",
"ex:info": {"@type": "@json"}
},
"http://example.org/vocab#info": {
"@value": {},
"@type": "@json"
}
}
12 changes: 12 additions & 0 deletions tests/frame/0069-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"@context": {
"ex": "http://example.org/vocab#",
"ex:info": {"@type": "@json"}
},
"@id": "http://example.org/test/#library",
"@type": "ex:Library",
"ex:info": {
"author": "JOHN",
"pages": 200
}
}
12 changes: 12 additions & 0 deletions tests/frame/0069-out.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"@context": {
"ex": "http://example.org/vocab#",
"ex:info": {"@type": "@json"}
},
"@id": "http://example.org/test/#library",
"@type": "ex:Library",
"ex:info": {
"author": "JOHN",
"pages": 200
}
}