--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0060-in.jsonld Fri Mar 01 14:12:46 2013 +0100
@@ -0,0 +1,30 @@
+{
+ "@context": {
+ "property": "http://example.com/vocab#property"
+ },
+ "@id": "../document-relative",
+ "@type": "#document-relative",
+ "property": {
+ "@context": {
+ "@base": "http://example.org/test/"
+ },
+ "@id": "../document-base-overwritten",
+ "@type": "#document-base-overwritten",
+ "property": [
+ {
+ "@context": null,
+ "@id": "../document-relative",
+ "@type": "#document-relative",
+ "property": "context completely reset, drops property"
+ },
+ {
+ "@context": {
+ "@base": null
+ },
+ "@id": "../document-relative",
+ "@type": "#document-relative",
+ "property": "only @base is reset"
+ }
+ ]
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0060-out.jsonld Fri Mar 01 14:12:46 2013 +0100
@@ -0,0 +1,23 @@
+[
+ {
+ "@id": "http://json-ld.org/test-suite/document-relative",
+ "@type": [ "http://json-ld.org/test-suite/tests/expand-0060-in.jsonld#document-relative" ],
+ "http://example.com/vocab#property": [
+ {
+ "@id": "http://example.org/document-base-overwritten",
+ "@type": [ "http://example.org/test/#document-base-overwritten" ],
+ "http://example.com/vocab#property": [
+ {
+ "@id": "http://json-ld.org/test-suite/document-relative",
+ "@type": [ "http://json-ld.org/test-suite/tests/expand-0060-in.jsonld#document-relative" ]
+ },
+ {
+ "@id": "http://json-ld.org/test-suite/document-relative",
+ "@type": [ "http://json-ld.org/test-suite/tests/expand-0060-in.jsonld#document-relative" ],
+ "http://example.com/vocab#property": [ { "@value": "only @base is reset" } ]
+ }
+ ]
+ }
+ ]
+ }
+]
--- a/test-suite/tests/expand-manifest.jsonld Fri Mar 01 13:54:58 2013 +0100
+++ b/test-suite/tests/expand-manifest.jsonld Fri Mar 01 14:12:46 2013 +0100
@@ -303,6 +303,11 @@
"name": "Reset @vocab by setting it to null",
"input": "expand-0059-in.jsonld",
"expect": "expand-0059-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:ExpandTest"],
+ "name": "Overwrite document base with @base and reset it again",
+ "input": "expand-0060-in.jsonld",
+ "expect": "expand-0060-out.jsonld"
}
]
}