diff --git a/tests/compact-manifest.jsonld b/tests/compact-manifest.jsonld index cedd7384..c8488652 100644 --- a/tests/compact-manifest.jsonld +++ b/tests/compact-manifest.jsonld @@ -1031,6 +1031,60 @@ "context": "compact/c013-context.jsonld", "expect": "compact/c013-out.jsonld", "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc014", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "type-scoped context nullification", + "purpose": "type-scoped context nullification", + "input": "compact/c014-in.jsonld", + "context": "compact/c014-context.jsonld", + "expect": "compact/c014-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc015", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "type-scoped base", + "purpose": "type-scoped base", + "input": "compact/c015-in.jsonld", + "context": "compact/c015-context.jsonld", + "expect": "compact/c015-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc016", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "type-scoped vocab", + "purpose": "type-scoped vocab", + "input": "compact/c016-in.jsonld", + "context": "compact/c016-context.jsonld", + "expect": "compact/c016-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc017", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "multiple type-scoped contexts are properly reverted", + "purpose": "multiple type-scoped contexts are property reverted", + "input": "compact/c017-in.jsonld", + "context": "compact/c017-context.jsonld", + "expect": "compact/c017-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc018", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "multiple type-scoped types resolved against previous context", + "purpose": "multiple type-scoped types resolved against previous context", + "input": "compact/c018-in.jsonld", + "context": "compact/c018-context.jsonld", + "expect": "compact/c018-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc019", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "type-scoped context with multiple property scoped terms", + "purpose": "type-scoped context with multiple property scoped terms", + "input": "compact/c019-in.jsonld", + "context": "compact/c019-context.jsonld", + "expect": "compact/c019-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#te001", "@type": [ "jld:NegativeEvaluationTest", "jld:CompactTest" ], diff --git a/tests/compact/c014-context.jsonld b/tests/compact/c014-context.jsonld new file mode 100644 index 00000000..2d48593a --- /dev/null +++ b/tests/compact/c014-context.jsonld @@ -0,0 +1,11 @@ +{ + "@context": { + "@vocab": "http://example/", + "foo": "http://example/foo", + "Type": { + "@context": [ + null + ] + } + } +} diff --git a/tests/compact/c014-in.jsonld b/tests/compact/c014-in.jsonld new file mode 100644 index 00000000..5a68fc26 --- /dev/null +++ b/tests/compact/c014-in.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example/foo": [{ + "@value": "will-exist" + }], + "http://example/p": [{ + "@type": ["http://example/Type"] + }] +}] diff --git a/tests/compact/c014-out.jsonld b/tests/compact/c014-out.jsonld new file mode 100644 index 00000000..79138aed --- /dev/null +++ b/tests/compact/c014-out.jsonld @@ -0,0 +1,15 @@ +{ + "@context": { + "@vocab": "http://example/", + "foo": "http://example/foo", + "Type": { + "@context": [ + null + ] + } + }, + "foo": "will-exist", + "p": { + "@type": "Type" + } +} diff --git a/tests/compact/c015-context.jsonld b/tests/compact/c015-context.jsonld new file mode 100644 index 00000000..aea86625 --- /dev/null +++ b/tests/compact/c015-context.jsonld @@ -0,0 +1,12 @@ +{ + "@context": { + "@base": "http://example/base-base", + "@vocab": "http://example/", + "foo": "http://example/foo", + "Type": { + "@context": { + "@base": "http://example/typed-base" + } + } + } +} diff --git a/tests/compact/c015-in.jsonld b/tests/compact/c015-in.jsonld new file mode 100644 index 00000000..2f3427a5 --- /dev/null +++ b/tests/compact/c015-in.jsonld @@ -0,0 +1,16 @@ +[{ + "@id": "http://example/base-base#base-id", + "http://example/p": [{ + "@id": "http://example/typed-base#typed-id", + "@type": ["http://example/Type"], + "http://example/subjectReference": [{ + "@id": "http://example/typed-base#subject-reference-id" + }], + "http://example/nestedNode": [{ + "@id": "http://example/base-base#nested-id", + "http://example/foo": [{ + "@value": "bar" + }] + }] + }] +}] diff --git a/tests/compact/c015-out.jsonld b/tests/compact/c015-out.jsonld new file mode 100644 index 00000000..83bb63d5 --- /dev/null +++ b/tests/compact/c015-out.jsonld @@ -0,0 +1,24 @@ +{ + "@context": { + "@base": "http://example/base-base", + "@vocab": "http://example/", + "foo": "http://example/foo", + "Type": { + "@context": { + "@base": "http://example/typed-base" + } + } + }, + "@id": "#base-id", + "p": { + "@id": "#typed-id", + "@type": "Type", + "subjectReference": { + "@id": "#subject-reference-id" + }, + "nestedNode": { + "@id": "#nested-id", + "foo": "bar" + } + } +} diff --git a/tests/compact/c016-context.jsonld b/tests/compact/c016-context.jsonld new file mode 100644 index 00000000..45296bef --- /dev/null +++ b/tests/compact/c016-context.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "Type": { + "@context": { + "@vocab": "http://example.com/" + } + } + } +} diff --git a/tests/compact/c016-in.jsonld b/tests/compact/c016-in.jsonld new file mode 100644 index 00000000..37bc728a --- /dev/null +++ b/tests/compact/c016-in.jsonld @@ -0,0 +1,16 @@ +[{ + "http://example.org/foo": [{ + "@value": "org" + }], + "http://example.org/p": [{ + "@type": ["http://example.org/Type"], + "http://example.com/foo": [{ + "@value": "com" + }], + "http://example.com/nested": [{ + "http://example.org/nested-prop": [{ + "@value": "org" + }] + }] + }] +}] diff --git a/tests/compact/c016-out.jsonld b/tests/compact/c016-out.jsonld new file mode 100644 index 00000000..2f1186ff --- /dev/null +++ b/tests/compact/c016-out.jsonld @@ -0,0 +1,18 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "Type": { + "@context": { + "@vocab": "http://example.com/" + } + } + }, + "foo": "org", + "p": { + "@type": "Type", + "foo": "com", + "nested": { + "nested-prop": "org" + } + } +} diff --git a/tests/compact/c017-context.jsonld b/tests/compact/c017-context.jsonld new file mode 100644 index 00000000..d1cca3ac --- /dev/null +++ b/tests/compact/c017-context.jsonld @@ -0,0 +1,19 @@ +{ + "@context": { + "@vocab": "http://example/", + "Bar": { + "@context": [ + { + "prop": "http://example/bar-prop" + } + ] + }, + "Foo": { + "@context": [ + { + "prop": "http://example/foo-prop" + } + ] + } + } +} diff --git a/tests/compact/c017-in.jsonld b/tests/compact/c017-in.jsonld new file mode 100644 index 00000000..7e7e49d9 --- /dev/null +++ b/tests/compact/c017-in.jsonld @@ -0,0 +1,14 @@ +[{ + "@type": [ + "http://example/Foo", + "http://example/Bar" + ], + "http://example/foo-prop": [{ + "@value": "foo" + }], + "http://example/nested": [{ + "http://example/prop": [{ + "@value": "vocab" + }] + }] +}] diff --git a/tests/compact/c017-out.jsonld b/tests/compact/c017-out.jsonld new file mode 100644 index 00000000..be32133c --- /dev/null +++ b/tests/compact/c017-out.jsonld @@ -0,0 +1,24 @@ +{ + "@context": { + "@vocab": "http://example/", + "Bar": { + "@context": [ + { + "prop": "http://example/bar-prop" + } + ] + }, + "Foo": { + "@context": [ + { + "prop": "http://example/foo-prop" + } + ] + } + }, + "@type": ["Foo", "Bar"], + "prop": "foo", + "nested": { + "prop": "vocab" + } +} diff --git a/tests/compact/c018-context.jsonld b/tests/compact/c018-context.jsonld new file mode 100644 index 00000000..d0033bbe --- /dev/null +++ b/tests/compact/c018-context.jsonld @@ -0,0 +1,21 @@ +{ + "@context": { + "@vocab": "http://example/", + "Bar": { + "@context": [ + null, + { + "prop": "http://example/bar-prop" + } + ] + }, + "Foo": { + "@context": [ + null, + { + "prop": "http://example/foo-prop" + } + ] + } + } +} diff --git a/tests/compact/c018-in.jsonld b/tests/compact/c018-in.jsonld new file mode 100644 index 00000000..ee0c79e1 --- /dev/null +++ b/tests/compact/c018-in.jsonld @@ -0,0 +1,11 @@ +[{ + "@type": [ + "http://example/Foo", + "http://example/Bar" + ], + "http://example/foo-prop": [ + { + "@value": "foo" + } + ] +}] diff --git a/tests/compact/c018-out.jsonld b/tests/compact/c018-out.jsonld new file mode 100644 index 00000000..f702f56d --- /dev/null +++ b/tests/compact/c018-out.jsonld @@ -0,0 +1,24 @@ + +{ + "@context": { + "@vocab": "http://example/", + "Bar": { + "@context": [ + null, + { + "prop": "http://example/bar-prop" + } + ] + }, + "Foo": { + "@context": [ + null, + { + "prop": "http://example/foo-prop" + } + ] + } + }, + "@type": ["Foo", "Bar"], + "prop": "foo" +} diff --git a/tests/compact/c019-context.jsonld b/tests/compact/c019-context.jsonld new file mode 100644 index 00000000..a7b6543f --- /dev/null +++ b/tests/compact/c019-context.jsonld @@ -0,0 +1,20 @@ +{ + "@context": { + "@vocab": "http://example/", + "prop": "http://example/base-prop", + "Type": { + "@context": { + "foo": { + "@context": { + "prop": "http://example/foo-prop" + } + }, + "bar": { + "@context": { + "prop": "http://example/bar-prop" + } + } + } + } + } +} diff --git a/tests/compact/c019-in.jsonld b/tests/compact/c019-in.jsonld new file mode 100644 index 00000000..3d25ead3 --- /dev/null +++ b/tests/compact/c019-in.jsonld @@ -0,0 +1,26 @@ +[{ + "@type": [ + "http://example/Type" + ], + "http://example/foo": [{ + "http://example/foo-prop": [ + { + "@value": "foo" + } + ] + }], + "http://example/bar": [{ + "http://example/bar-prop": [ + { + "@value": "bar" + } + ] + }], + "http://example/baz": [{ + "http://example/base-prop": [ + { + "@value": "baz" + } + ] + }] +}] diff --git a/tests/compact/c019-out.jsonld b/tests/compact/c019-out.jsonld new file mode 100644 index 00000000..418c9cbe --- /dev/null +++ b/tests/compact/c019-out.jsonld @@ -0,0 +1,30 @@ +{ + "@context": { + "@vocab": "http://example/", + "prop": "http://example/base-prop", + "Type": { + "@context": { + "foo": { + "@context": { + "prop": "http://example/foo-prop" + } + }, + "bar": { + "@context": { + "prop": "http://example/bar-prop" + } + } + } + } + }, + "@type": "Type", + "foo": { + "prop": "foo" + }, + "bar": { + "prop": "bar" + }, + "baz": { + "prop": "baz" + } +}