Add test for reverse property compaction of unlabeled blank nodes.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0067-context.jsonld Mon Mar 11 16:50:47 2013 -0400
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows" }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0067-in.jsonld Mon Mar 11 16:50:47 2013 -0400
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ },
+ {
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Gregg Kellogg" } ]
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0067-out.jsonld Mon Mar 11 16:50:47 2013 -0400
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows" }
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "isKnownBy": [
+ {
+ "name": "Dave Longley"
+ },
+ {
+ "name": "Gregg Kellogg"
+ }
+ ]
+}
--- a/test-suite/tests/compact-manifest.jsonld Mon Mar 11 16:15:46 2013 -0400
+++ b/test-suite/tests/compact-manifest.jsonld Mon Mar 11 16:50:47 2013 -0400
@@ -384,6 +384,12 @@
"input": "compact-0066-in.jsonld",
"context": "compact-0066-context.jsonld",
"expect": "compact-0066-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "Compact reverse property whose values are unlabeled blank nodes",
+ "input": "compact-0067-in.jsonld",
+ "context": "compact-0067-context.jsonld",
+ "expect": "compact-0067-out.jsonld"
}
]
}