Add language map compaction test with @vocab, a default language, and a competing term
This addresses #133.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0026-context.jsonld Sat Dec 08 21:40:08 2012 +0100
@@ -0,0 +1,19 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/vocab/",
+ "@language": "it",
+ "s": { "@id": "label", "@language": "en" },
+ "label": {
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ },
+ "http://example.com/vocab/label": [
+ "Il re",
+ { "@value": "The king", "@language": "en" }
+ ]
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0026-in.jsonld Sat Dec 08 21:40:08 2012 +0100
@@ -0,0 +1,21 @@
+[{
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {
+ "@value": "Il re",
+ "@language": "it"
+ }, {
+ "@value": "The king",
+ "@language": "en"
+ }, {
+ "@value": "The Queen",
+ "@language": "en"
+ }, {
+ "@value": "Die Königin",
+ "@language": "de"
+ }, {
+ "@value": "Ihre Majestät",
+ "@language": "de"
+ }
+ ]
+}]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0026-out.jsonld Sat Dec 08 21:40:08 2012 +0100
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/vocab/",
+ "@language": "it",
+ "s": { "@id": "label", "@language": "en" },
+ "label": {
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "it": "Il re",
+ "en": [ "The king", "The Queen" ],
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
--- a/test-suite/tests/compact-manifest.jsonld Sat Dec 08 21:31:19 2012 +0100
+++ b/test-suite/tests/compact-manifest.jsonld Sat Dec 08 21:40:08 2012 +0100
@@ -156,5 +156,11 @@
"input": "compact-0025-in.jsonld",
"context": "compact-0025-context.jsonld",
"expect": "compact-0025-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "Using language maps with @vocab, a default language, and a competing term",
+ "input": "compact-0026-in.jsonld",
+ "context": "compact-0026-context.jsonld",
+ "expect": "compact-0026-out.jsonld"
}]
}