Skip to content

Commit 51736a0

Browse files
committed
Add more @protected tests.
1 parent ad702d6 commit 51736a0

15 files changed

+237
-0
lines changed

tests/expand-manifest.jsonld

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,6 +1937,62 @@
19371937
"option": {"specVersion": "json-ld-1.1"},
19381938
"input": "expand/pr09-in.jsonld",
19391939
"expect": "protected term redefinition"
1940+
}, {
1941+
"@id": "#tpr10",
1942+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
1943+
"name": "",
1944+
"purpose": "",
1945+
"option": {"specVersion": "json-ld-1.1"},
1946+
"input": "expand/pr10-in.jsonld",
1947+
"expect": "expand/pr10-out.jsonld"
1948+
}, {
1949+
"@id": "#tpr11",
1950+
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
1951+
"name": "",
1952+
"purpose": "",
1953+
"option": {"specVersion": "json-ld-1.1"},
1954+
"input": "expand/pr11-in.jsonld",
1955+
"expect": "protected term redefinition"
1956+
}, {
1957+
"@id": "#tpr12",
1958+
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
1959+
"name": "",
1960+
"purpose": "",
1961+
"option": {"specVersion": "json-ld-1.1"},
1962+
"input": "expand/pr12-in.jsonld",
1963+
"expect": "protected term redefinition"
1964+
}, {
1965+
"@id": "#tpr13",
1966+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
1967+
"name": "",
1968+
"purpose": "",
1969+
"option": {"specVersion": "json-ld-1.1"},
1970+
"input": "expand/pr13-in.jsonld",
1971+
"expect": "expand/pr13-out.jsonld"
1972+
}, {
1973+
"@id": "#tpr14",
1974+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
1975+
"name": "",
1976+
"purpose": "",
1977+
"option": {"specVersion": "json-ld-1.1"},
1978+
"input": "expand/pr14-in.jsonld",
1979+
"expect": "expand/pr14-out.jsonld"
1980+
}, {
1981+
"@id": "#tpr15",
1982+
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
1983+
"name": "",
1984+
"purpose": "",
1985+
"option": {"specVersion": "json-ld-1.1"},
1986+
"input": "expand/pr15-in.jsonld",
1987+
"expect": "invalid context nullification"
1988+
}, {
1989+
"@id": "#tpr16",
1990+
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
1991+
"name": "",
1992+
"purpose": "",
1993+
"option": {"specVersion": "json-ld-1.1"},
1994+
"input": "expand/pr16-in.jsonld",
1995+
"expect": "invalid context nullification"
19401996
}, {
19411997
"@id": "#ttn01",
19421998
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],

tests/expand/pr10-in.jsonld

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"protected": {
5+
"@id": "ex:protected",
6+
"@protected": true
7+
},
8+
"unprotected": "ex:unprotected"
9+
},
10+
"protected": "p === ex:protected",
11+
"unprotected": {
12+
"protected": "p === ex:protected"
13+
}
14+
}

tests/expand/pr10-out.jsonld

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"ex:protected": [
4+
{
5+
"@value": "p === ex:protected"
6+
}
7+
],
8+
"ex:unprotected": [
9+
{
10+
"ex:protected": [
11+
{
12+
"@value": "p === ex:protected"
13+
}
14+
]
15+
}
16+
]
17+
}
18+
]

tests/expand/pr11-in.jsonld

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"protected": {
5+
"@id": "ex:protected",
6+
"@protected": true
7+
},
8+
"unprotected": "ex:unprotected"
9+
},
10+
"protected": "p === ex:protected",
11+
"unprotected": {
12+
"@context": {
13+
"protected": "ex:protected2"
14+
},
15+
"protected": "p === ex:protected"
16+
}
17+
}

tests/expand/pr11-out.jsonld

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

tests/expand/pr12-in.jsonld

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"@protected": true,
5+
"protected1": "ex:protected1",
6+
"protected2": "ex:protected2"
7+
},
8+
"protected1": "p1",
9+
"protected2": {
10+
"@context": {
11+
"protected1": "ex:protected1:error"
12+
},
13+
"protected1": "p1error"
14+
}
15+
}

tests/expand/pr12-out.jsonld

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

tests/expand/pr13-in.jsonld

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"@protected": true,
5+
"protected": "ex:protected",
6+
"unprotected": {
7+
"@id": "ex:unprotected1",
8+
"@protected": false
9+
}
10+
},
11+
"protected": {
12+
"@context": {
13+
"unprotected": "ex:unprotected2"
14+
},
15+
"unprotected": "p === ex:unprotected2"
16+
},
17+
"unprotected": "p === ex:unprotected1"
18+
}

tests/expand/pr13-out.jsonld

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"ex:protected": [
4+
{
5+
"ex:unprotected2": [
6+
{
7+
"@value": "p === ex:unprotected2"
8+
}
9+
]
10+
}
11+
],
12+
"ex:unprotected1": [
13+
{
14+
"@value": "p === ex:unprotected1"
15+
}
16+
]
17+
}
18+
]

tests/expand/pr14-in.jsonld

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"@protected": true,
5+
"protected1": "ex:protected1",
6+
"protected2": {
7+
"@id": "ex:protected2",
8+
"@context": [null]
9+
}
10+
},
11+
"protected1": "p === ex:protected1",
12+
"protected2": {
13+
"@context": {
14+
"protected": "ex:protected3"
15+
},
16+
"protected": "p === ex:protected3"
17+
}
18+
}

tests/expand/pr14-out.jsonld

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"ex:protected1": [
4+
{
5+
"@value": "p === ex:protected1"
6+
}
7+
],
8+
"ex:protected2": [
9+
{
10+
"ex:protected3": [
11+
{
12+
"@value": "p === ex:protected3"
13+
}
14+
]
15+
}
16+
]
17+
}
18+
]

tests/expand/pr15-in.jsonld

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"@protected": true,
5+
"protected1": "ex:protected1",
6+
"protected2": "ex:protected2",
7+
"Protected": {
8+
"@id": "ex:Protected",
9+
"@context": [
10+
null
11+
]
12+
}
13+
},
14+
"protected1": "p === protected1",
15+
"protected2": {
16+
"@type": "Protected",
17+
"@context": {
18+
"protected": "ex:protected3"
19+
},
20+
"protected": "error"
21+
}
22+
}

tests/expand/pr15-out.jsonld

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

tests/expand/pr16-in.jsonld

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"@protected": true,
5+
"protected1": "ex:protected1",
6+
"protected2": "ex:protected2",
7+
"Protected": {
8+
"@id": "ex:Protected",
9+
"@context": [
10+
null,
11+
{
12+
"protected": "ex:protected3"
13+
}
14+
]
15+
}
16+
},
17+
"@type": "Protected",
18+
"protected": "error"
19+
}

tests/expand/pr16-out.jsonld

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

0 commit comments

Comments
 (0)