Skip to content

Commit 2418b1f

Browse files
pchampingkellogg
authored andcommitted
add test for the new error case
1 parent 2d659f6 commit 2418b1f

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

tests/expand-manifest.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5360,6 +5360,27 @@ <h2>
53605360
</dd>
53615361
</dl>
53625362
</dd>
5363+
<dt id='te052'>
5364+
Test te052 Definition for the empty term
5365+
</dt>
5366+
<dd>
5367+
<dl class='entry'>
5368+
<dt>id</dt>
5369+
<dd>#te052</dd>
5370+
<dt>Type</dt>
5371+
<dd>jld:NegativeEvaluationTest, jld:ExpandTest</dd>
5372+
<dt>Purpose</dt>
5373+
<dd>Verifies that an exception is raised on expansion when a context contains a definition for the empty term</dd>
5374+
<dt>input</dt>
5375+
<dd>
5376+
<a href='expand/e052-in.jsonld'>expand/e052-in.jsonld</a>
5377+
</dd>
5378+
<dt>expect</dt>
5379+
<dd>
5380+
invalid term definition
5381+
</dd>
5382+
</dl>
5383+
</dd>
53635384
<dt id='tec01'>
53645385
Test tec01 Invalid keyword in term definition
53655386
</dt>

tests/expand-manifest.jsonld

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,6 +1624,13 @@
16241624
"purpose": "Verifies that an exception is raised in Expansion when an invalid value object value is found using a value alias",
16251625
"input": "expand/e051-in.jsonld",
16261626
"expectErrorCode": "invalid value object value"
1627+
}, {
1628+
"@id": "#te052",
1629+
"@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
1630+
"name": "Definition for the empty term",
1631+
"purpose": "Verifies that an exception is raised on expansion when a context contains a definition for the empty term",
1632+
"input": "expand/e052-in.jsonld",
1633+
"expectErrorCode": "invalid term definition"
16271634
}, {
16281635
"@id": "#tec01",
16291636
"@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],

tests/expand/e052-in.jsonld

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"@context": {
3+
"term": {"@id": "http://example.org/term"},
4+
"": {"@id": "http://example.org/empty"}
5+
},
6+
"@id": "http://example/test#example"
7+
}

0 commit comments

Comments
 (0)