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

Add graph container array tests. #585

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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/expand-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,38 @@
"input": "expand/0131-in.jsonld",
"expect": "expand/0131-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#t0200",
"@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
"name": "Expand @graph @container with plain literals",
"purpose": "Expanding a @graph @container containing plain literals.",
"input": "expand/0200-in.jsonld",
"expect": "expand/0200-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#t0201",
"@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
"name": "Expand @type:@id @graph @container with IRIs",
"purpose": "Expanding a @type:@id @graph @container containing IRIs.",
"input": "expand/0201-in.jsonld",
"expect": "expand/0201-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#t0202",
"@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
"name": "Expand @graph @container with nullified @context with plain literals",
"purpose": "Expanding a @graph @container with nullified @context containing plain literals.",
"input": "expand/0202-in.jsonld",
"expect": "expand/0202-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#t0203",
"@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
"name": "Expand @type:@id @graph @container with nullified @context with IRIs",
"purpose": "Expanding a @type:@id @graph @container with nullified @context containing IRIs.",
"input": "expand/0203-in.jsonld",
"expect": "expand/0203-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#tc001",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
Expand Down
13 changes: 13 additions & 0 deletions tests/expand/0200-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"@context": {
"p": {
"@id": "ex:p",
"@container": "@graph"
}
},
"@id": "ex:outer",
"p": [
"test1",
"test2"
]
}
1 change: 1 addition & 0 deletions tests/expand/0200-out.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
14 changes: 14 additions & 0 deletions tests/expand/0201-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"@context": {
"p": {
"@id": "ex:p",
"@type": "@id",
"@container": "@graph"
}
},
"@id": "ex:outer",
"p": [
"ex:test1",
"ex:test2"
]
}
1 change: 1 addition & 0 deletions tests/expand/0201-out.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
14 changes: 14 additions & 0 deletions tests/expand/0202-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"@context": {
"p": {
"@id": "ex:p",
"@container": "@graph",
"@context": null
}
},
"@id": "ex:outer",
"p": [
"test1",
"test2"
]
}
1 change: 1 addition & 0 deletions tests/expand/0202-out.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
15 changes: 15 additions & 0 deletions tests/expand/0203-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"@context": {
"p": {
"@id": "ex:p",
"@type": "@id",
"@container": "@graph",
"@context": null
}
},
"@id": "ex:outer",
"p": [
"ex:test1",
"ex:test2"
]
}
1 change: 1 addition & 0 deletions tests/expand/0203-out.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
28 changes: 28 additions & 0 deletions tests/toRdf-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,34 @@
"purpose": "Expanding a reverse term using @container: @index and @index set to a property (from expand#t0131)",
"input": "toRdf/0133-in.jsonld",
"expect": "toRdf/0133-out.nq"
}, {
"@id": "#t0200",
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
"name": "Expand @graph @container with plain literals",
"purpose": "Expanding a @graph @container containing plain literals.",
"input": "toRdf/0200-in.jsonld",
"expect": "toRdf/0200-out.nq"
}, {
"@id": "#t0201",
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
"name": "Expand @type:@id @graph @container with IRIs",
"purpose": "Expanding a @type:@id @graph @container containing IRIs.",
"input": "toRdf/0201-in.jsonld",
"expect": "toRdf/0201-out.nq"
}, {
"@id": "#t0202",
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
"name": "Expand @graph @container with nullified @context with plain literals",
"purpose": "Expanding a @graph @container with nullified @context containing plain literals.",
"input": "toRdf/0202-in.jsonld",
"expect": "toRdf/0202-out.nq"
}, {
"@id": "#t0203",
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
"name": "Expand @type:@id @graph @container with nullified @context with IRIs",
"purpose": "Expanding a @type:@id @graph @container with nullified @context containing IRIs.",
"input": "toRdf/0203-in.jsonld",
"expect": "toRdf/0203-out.nq"
}, {
"@id": "#tc001",
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
Expand Down
13 changes: 13 additions & 0 deletions tests/toRdf/0200-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"@context": {
"p": {
"@id": "ex:p",
"@container": "@graph"
}
},
"@id": "ex:outer",
"p": [
"ex:test1",
"ex:test2"
]
}
Empty file added tests/toRdf/0200-out.nq
Empty file.
14 changes: 14 additions & 0 deletions tests/toRdf/0201-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"@context": {
"p": {
"@id": "ex:p",
"@type": "@id",
"@container": "@graph"
}
},
"@id": "ex:outer",
"p": [
"ex:test1",
"ex:test2"
]
}
Empty file added tests/toRdf/0201-out.nq
Empty file.
14 changes: 14 additions & 0 deletions tests/toRdf/0202-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"@context": {
"p": {
"@id": "ex:p",
"@container": "@graph",
"@context": null
}
},
"@id": "ex:outer",
"p": [
"ex:test1",
"ex:test2"
]
}
Empty file added tests/toRdf/0202-out.nq
Empty file.
15 changes: 15 additions & 0 deletions tests/toRdf/0203-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"@context": {
"p": {
"@id": "ex:p",
"@type": "@id",
"@container": "@graph",
"@context": null
}
},
"@id": "ex:outer",
"p": [
"ex:test1",
"ex:test2"
]
}
Empty file added tests/toRdf/0203-out.nq
Empty file.
Loading