--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0059-context.jsonld Thu Feb 14 18:09:32 2013 +0100
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "Bar": "http://example.com/vocab#Bar",
+ "foo": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@vocab"
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0059-in.jsonld Thu Feb 14 18:09:32 2013 +0100
@@ -0,0 +1,8 @@
+[
+ {
+ "http://example.com/vocab#foo": [
+ { "@id": "http://example.com/vocab#Bar" },
+ { "@id": "http://example.com/vocab#Baz" }
+ ]
+ }
+]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0059-out.jsonld Thu Feb 14 18:09:32 2013 +0100
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "Bar": "http://example.com/vocab#Bar",
+ "foo": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@vocab"
+ }
+ },
+ "foo": [
+ "Bar",
+ "http://example.com/vocab#Baz"
+ ]
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0060-context.jsonld Thu Feb 14 18:09:32 2013 +0100
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "Bar": "http://example.com/vocab#Bar",
+ "foo": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@id"
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0060-in.jsonld Thu Feb 14 18:09:32 2013 +0100
@@ -0,0 +1,8 @@
+[
+ {
+ "http://example.com/vocab#foo": [
+ { "@id": "http://example.com/vocab#Bar" },
+ { "@id": "http://example.com/vocab#Baz" }
+ ]
+ }
+]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0060-out.jsonld Thu Feb 14 18:09:32 2013 +0100
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "Bar": "http://example.com/vocab#Bar",
+ "foo": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@id"
+ }
+ },
+ "foo": [
+ "http://example.com/vocab#Bar",
+ "http://example.com/vocab#Baz"
+ ]
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0061-context.jsonld Thu Feb 14 18:09:32 2013 +0100
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "Bar": "http://example.com/vocab#Bar",
+ "fooI": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@id"
+ },
+ "fooV": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@vocab"
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0061-in.jsonld Thu Feb 14 18:09:32 2013 +0100
@@ -0,0 +1,8 @@
+[
+ {
+ "http://example.com/vocab#foo": [
+ { "@id": "http://example.com/vocab#Bar" },
+ { "@id": "http://example.com/vocab#Baz" }
+ ]
+ }
+]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0061-out.jsonld Thu Feb 14 18:09:32 2013 +0100
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "Bar": "http://example.com/vocab#Bar",
+ "fooI": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@id"
+ },
+ "fooV": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@vocab"
+ }
+ },
+ "fooV": "Bar",
+ "fooI": "http://example.com/vocab#Baz"
+}
--- a/test-suite/tests/compact-manifest.jsonld Thu Feb 14 12:11:27 2013 -0500
+++ b/test-suite/tests/compact-manifest.jsonld Thu Feb 14 18:09:32 2013 +0100
@@ -354,6 +354,24 @@
"input": "compact-0058-in.jsonld",
"context": "compact-0058-context.jsonld",
"expect": "compact-0058-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "If there's no term with @type: @id, use terms with @type: @vocab for IRIs not mapped to terms",
+ "input": "compact-0059-in.jsonld",
+ "context": "compact-0059-context.jsonld",
+ "expect": "compact-0059-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "If there's no term with @type: @vocab, use terms with @type: @id for IRIs mapped to terms",
+ "input": "compact-0060-in.jsonld",
+ "context": "compact-0060-context.jsonld",
+ "expect": "compact-0060-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "Separate IRIs for the same property to use term with more specific @type (@id vs. @vocab)",
+ "input": "compact-0061-in.jsonld",
+ "context": "compact-0061-context.jsonld",
+ "expect": "compact-0061-out.jsonld"
}
]
}