Add compactArrays=false option for compact and flatten API tests. Also tests passing a context to flatten.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0070-context.jsonld Tue Aug 27 17:04:04 2013 -0700
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "term": "http://example/term"
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0070-in.jsonld Tue Aug 27 17:04:04 2013 -0700
@@ -0,0 +1,4 @@
+[{
+ "@id": "http://example/foo",
+ "http://example/term": [{"@value": "value"}]
+}]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0070-out.jsonld Tue Aug 27 17:04:04 2013 -0700
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "term": "http://example/term"
+ },
+ "@graph": [{
+ "@id": "http://example/foo",
+ "term": ["value"]
+ }]
+}
--- a/test-suite/tests/compact-manifest.jsonld Tue Aug 27 16:17:46 2013 -0700
+++ b/test-suite/tests/compact-manifest.jsonld Tue Aug 27 17:04:04 2013 -0700
@@ -558,6 +558,17 @@
"input": "compact-0069-in.jsonld",
"context": "compact-0069-context.jsonld",
"expect": "compact-0069-out.jsonld"
+ }, {
+ "@id": "#t0070",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "compactArrays option",
+ "purpose": "Setting compactArrays to false causes single element arrays to be retained",
+ "option": {
+ "compactArrays": false
+ },
+ "input": "compact-0070-in.jsonld",
+ "context": "compact-0070-context.jsonld",
+ "expect": "compact-0070-out.jsonld"
}
]
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/flatten-0044-context.jsonld Tue Aug 27 17:04:04 2013 -0700
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "term": "http://example/term"
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/flatten-0044-in.jsonld Tue Aug 27 17:04:04 2013 -0700
@@ -0,0 +1,4 @@
+[{
+ "@id": "http://example/foo",
+ "http://example/term": [{"@value": "value"}]
+}]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/flatten-0044-out.jsonld Tue Aug 27 17:04:04 2013 -0700
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "term": "http://example/term"
+ },
+ "@graph": [{
+ "@id": "http://example/foo",
+ "term": ["value"]
+ }]
+}
--- a/test-suite/tests/flatten-manifest.jsonld Tue Aug 27 16:17:46 2013 -0700
+++ b/test-suite/tests/flatten-manifest.jsonld Tue Aug 27 17:04:04 2013 -0700
@@ -307,6 +307,17 @@
"purpose": "Flatten a test manifest",
"input": "flatten-0043-in.jsonld",
"expect": "flatten-0043-out.jsonld"
+ }, {
+ "@id": "#t0044",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "compactArrays option",
+ "purpose": "Setting compactArrays to false causes single element arrays to be retained",
+ "option": {
+ "compactArrays": false
+ },
+ "input": "flatten-0044-in.jsonld",
+ "context": "flatten-0044-context.jsonld",
+ "expect": "flatten-0044-out.jsonld"
}
]
}