Skip to content

Commit db81e26

Browse files
committed
Lazy-Eval processingMode.
* Updates to existing tests to make json-ld-1.1 the presumed version, unless json-ld-1.0 is set explicitly. For #161.
1 parent 154d9b2 commit db81e26

9 files changed

+25
-108
lines changed

tests/compact-manifest.html

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4426,38 +4426,6 @@ <h2>
44264426
</dd>
44274427
</dl>
44284428
</dd>
4429-
<dt id='tep04'>
4430-
Test tep04 Processing mode is implicitly json-ld-1.0
4431-
</dt>
4432-
<dd>
4433-
<dl class='entry'>
4434-
<dt>id</dt>
4435-
<dd>#tep04</dd>
4436-
<dt>Type</dt>
4437-
<dd>jld:NegativeEvaluationTest, jld:CompactTest</dd>
4438-
<dt>Purpose</dt>
4439-
<dd>If not specified using processingMode, processing mode is taken as json-ld-1.0</dd>
4440-
<dt>input</dt>
4441-
<dd>
4442-
<a href='compact/ep04-in.jsonld'>compact/ep04-in.jsonld</a>
4443-
</dd>
4444-
<dt>context</dt>
4445-
<dd>
4446-
<a href='compact/ep04-context.jsonld'>compact/ep04-context.jsonld</a>
4447-
</dd>
4448-
<dt>expect</dt>
4449-
<dd>
4450-
invalid container mapping
4451-
</dd>
4452-
<dt>Options</dt>
4453-
<dd>
4454-
<dl class='options'>
4455-
<dt>specVersion</dt>
4456-
<dd>json-ld-1.1</dd>
4457-
</dl>
4458-
</dd>
4459-
</dl>
4460-
</dd>
44614429
<dt id='tep05'>
44624430
Test tep05 processingMode json-ld-1.0 conflicts with @version: 1.1
44634431
</dt>
@@ -4468,7 +4436,7 @@ <h2>
44684436
<dt>Type</dt>
44694437
<dd>jld:NegativeEvaluationTest, jld:CompactTest</dd>
44704438
<dt>Purpose</dt>
4471-
<dd>If not specified using processingMode, processing mode is taken as json-ld-1.0</dd>
4439+
<dd>If processingMode is explicitly json-ld-1.0, it will conflict with 1.1 features.</dd>
44724440
<dt>input</dt>
44734441
<dd>
44744442
<a href='compact/ep05-in.jsonld'>compact/ep05-in.jsonld</a>

tests/compact-manifest.jsonld

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,20 +1265,11 @@
12651265
"context": "compact/en01-context.jsonld",
12661266
"expect": "invalid @nest value",
12671267
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
1268-
}, {
1269-
"@id": "#tep04",
1270-
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
1271-
"name": "Processing mode is implicitly json-ld-1.0",
1272-
"purpose": "If not specified using processingMode, processing mode is taken as json-ld-1.0",
1273-
"option": {"specVersion": "json-ld-1.1"},
1274-
"input": "compact/ep04-in.jsonld",
1275-
"context": "compact/ep04-context.jsonld",
1276-
"expect": "invalid container mapping"
12771268
}, {
12781269
"@id": "#tep05",
12791270
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
12801271
"name": "processingMode json-ld-1.0 conflicts with @version: 1.1",
1281-
"purpose": "If not specified using processingMode, processing mode is taken as json-ld-1.0",
1272+
"purpose": "If processingMode is explicitly json-ld-1.0, it will conflict with 1.1 features.",
12821273
"input": "compact/ep05-in.jsonld",
12831274
"context": "compact/ep05-context.jsonld",
12841275
"expect": "processing mode conflict",

tests/compact/ep04-context.jsonld

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/compact/ep04-in.jsonld

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/expand-manifest.html

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3732,6 +3732,8 @@ <h2>
37323732
<dl class='options'>
37333733
<dt>specVersion</dt>
37343734
<dd>json-ld-1.1</dd>
3735+
<dt>processingMode</dt>
3736+
<dd>json-ld-1.0</dd>
37353737
</dl>
37363738
</dd>
37373739
</dl>
@@ -4922,7 +4924,7 @@ <h2>
49224924
</dl>
49234925
</dd>
49244926
<dt id='te042'>
4925-
Test te042 Keywords may not be redefined
4927+
Test te042 Keywords may not be redefined in 1.0
49264928
</dt>
49274929
<dd>
49284930
<dl class='entry'>
@@ -4940,6 +4942,15 @@ <h2>
49404942
<dd>
49414943
keyword redefinition
49424944
</dd>
4945+
<dt>Options</dt>
4946+
<dd>
4947+
<dl class='options'>
4948+
<dt>specVersion</dt>
4949+
<dd>json-ld-1.1</dd>
4950+
<dt>processingMode</dt>
4951+
<dd>json-ld-1.0</dd>
4952+
</dl>
4953+
</dd>
49434954
</dl>
49444955
</dd>
49454956
<dt id='te043'>
@@ -5294,34 +5305,6 @@ <h2>
52945305
</dd>
52955306
</dl>
52965307
</dd>
5297-
<dt id='tep01'>
5298-
Test tep01 Processing mode is implicitly json-ld-1.0
5299-
</dt>
5300-
<dd>
5301-
<dl class='entry'>
5302-
<dt>id</dt>
5303-
<dd>#tep01</dd>
5304-
<dt>Type</dt>
5305-
<dd>jld:NegativeEvaluationTest, jld:ExpandTest</dd>
5306-
<dt>Purpose</dt>
5307-
<dd>If not specified using processingMode, processing mode is taken as json-ld-1.0</dd>
5308-
<dt>input</dt>
5309-
<dd>
5310-
<a href='expand/ep01-in.jsonld'>expand/ep01-in.jsonld</a>
5311-
</dd>
5312-
<dt>expect</dt>
5313-
<dd>
5314-
invalid container mapping
5315-
</dd>
5316-
<dt>Options</dt>
5317-
<dd>
5318-
<dl class='options'>
5319-
<dt>specVersion</dt>
5320-
<dd>json-ld-1.1</dd>
5321-
</dl>
5322-
</dd>
5323-
</dl>
5324-
</dd>
53255308
<dt id='tep02'>
53265309
Test tep02 processingMode json-ld-1.0 conflicts with @version: 1.1
53275310
</dt>
@@ -5332,7 +5315,7 @@ <h2>
53325315
<dt>Type</dt>
53335316
<dd>jld:NegativeEvaluationTest, jld:ExpandTest</dd>
53345317
<dt>Purpose</dt>
5335-
<dd>If not specified using processingMode, processing mode is taken as json-ld-1.0</dd>
5318+
<dd>If processingMode is explicitly json-ld-1.0, it will conflict with 1.1 features.</dd>
53365319
<dt>input</dt>
53375320
<dd>
53385321
<a href='expand/ep02-in.jsonld'>expand/ep02-in.jsonld</a>
@@ -8968,6 +8951,8 @@ <h2>
89688951
<dl class='options'>
89698952
<dt>specVersion</dt>
89708953
<dd>json-ld-1.1</dd>
8954+
<dt>processingMode</dt>
8955+
<dd>json-ld-1.0</dd>
89718956
</dl>
89728957
</dd>
89738958
</dl>

tests/expand-manifest.jsonld

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@
10991099
"purpose": "@propagate is invalid in 1.0",
11001100
"input": "expand/c029-in.jsonld",
11011101
"expect": "invalid context member",
1102-
"option": {"specVersion": "json-ld-1.1"}
1102+
"option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}
11031103
}, {
11041104
"@id": "#tc030",
11051105
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
@@ -1476,8 +1476,9 @@
14761476
}, {
14771477
"@id": "#te042",
14781478
"@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
1479-
"name": "Keywords may not be redefined",
1479+
"name": "Keywords may not be redefined in 1.0",
14801480
"purpose": "Verifies that an exception is raised on expansion when processing an invalid context attempting to define @container on a keyword",
1481+
"option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"},
14811482
"input": "expand/e042-in.jsonld",
14821483
"expect": "keyword redefinition"
14831484
}, {
@@ -1576,19 +1577,11 @@
15761577
"input": "expand/en06-in.jsonld",
15771578
"expect": "invalid reverse property",
15781579
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
1579-
}, {
1580-
"@id": "#tep01",
1581-
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
1582-
"name": "Processing mode is implicitly json-ld-1.0",
1583-
"purpose": "If not specified using processingMode, processing mode is taken as json-ld-1.0",
1584-
"option": {"specVersion": "json-ld-1.1"},
1585-
"input": "expand/ep01-in.jsonld",
1586-
"expect": "invalid container mapping"
15871580
}, {
15881581
"@id": "#tep02",
15891582
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
15901583
"name": "processingMode json-ld-1.0 conflicts with @version: 1.1",
1591-
"purpose": "If not specified using processingMode, processing mode is taken as json-ld-1.0",
1584+
"purpose": "If processingMode is explicitly json-ld-1.0, it will conflict with 1.1 features.",
15921585
"input": "expand/ep02-in.jsonld",
15931586
"expect": "processing mode conflict",
15941587
"option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}
@@ -2605,7 +2598,7 @@
26052598
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
26062599
"name": "@type: @none is illegal in 1.0.",
26072600
"purpose": "@type: @none is illegal in json-ld-1.0.",
2608-
"option": {"specVersion": "json-ld-1.1"},
2601+
"option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"},
26092602
"input": "expand/tn01-in.jsonld",
26102603
"expect": "invalid type mapping"
26112604
}, {

tests/expand/ep01-in.jsonld

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/toRdf-manifest.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8034,6 +8034,8 @@ <h2>
80348034
<dl class='options'>
80358035
<dt>specVersion</dt>
80368036
<dd>json-ld-1.1</dd>
8037+
<dt>processingMode</dt>
8038+
<dd>json-ld-1.0</dd>
80378039
</dl>
80388040
</dd>
80398041
</dl>

tests/toRdf-manifest.jsonld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2379,7 +2379,7 @@
23792379
"@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"],
23802380
"name": "@type: @none is illegal in 1.0.",
23812381
"purpose": "@type: @none is illegal in json-ld-1.0.",
2382-
"option": {"specVersion": "json-ld-1.1"},
2382+
"option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"},
23832383
"input": "toRdf/tn01-in.jsonld",
23842384
"expect": "invalid type mapping"
23852385
}, {

0 commit comments

Comments
 (0)