Skip to content

Commit 88d780d

Browse files
gkelloggdavidlehn
authored andcommitted
Fix manifest base for EARL reporting.
(cherry picked from commit 020e51b57236f5496bceea6d3429a265fb4c836f)
1 parent a4a9d5f commit 88d780d

File tree

1 file changed

+70
-70
lines changed

1 file changed

+70
-70
lines changed

tests/test-common.js

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ const TEST_TYPES = {
3333
specVersion: ['json-ld-1.0'],
3434
// FIXME
3535
// NOTE: idRegex format:
36-
//MMM-manifest.jsonld#tNNN$/,
36+
//MMM-manifest#tNNN$/,
3737
idRegex: [
3838
// html
39-
/html-manifest.jsonld#tc001$/,
40-
/html-manifest.jsonld#tc002$/,
41-
/html-manifest.jsonld#tc003$/,
42-
/html-manifest.jsonld#tc004$/,
39+
/html-manifest#tc001$/,
40+
/html-manifest#tc002$/,
41+
/html-manifest#tc003$/,
42+
/html-manifest#tc004$/,
4343
]
4444
},
4545
fn: 'compact',
@@ -57,38 +57,38 @@ const TEST_TYPES = {
5757
specVersion: ['json-ld-1.0'],
5858
// FIXME
5959
// NOTE: idRegex format:
60-
//MMM-manifest.jsonld#tNNN$/,
60+
//MMM-manifest#tNNN$/,
6161
idRegex: [
6262
// html
63-
/html-manifest.jsonld#te001$/,
64-
/html-manifest.jsonld#te002$/,
65-
/html-manifest.jsonld#te003$/,
66-
/html-manifest.jsonld#te004$/,
67-
/html-manifest.jsonld#te005$/,
68-
/html-manifest.jsonld#te006$/,
69-
/html-manifest.jsonld#te007$/,
70-
/html-manifest.jsonld#te010$/,
71-
/html-manifest.jsonld#te011$/,
72-
/html-manifest.jsonld#te012$/,
73-
/html-manifest.jsonld#te013$/,
74-
/html-manifest.jsonld#te014$/,
75-
/html-manifest.jsonld#te015$/,
76-
/html-manifest.jsonld#te016$/,
77-
/html-manifest.jsonld#te017$/,
78-
/html-manifest.jsonld#te018$/,
79-
/html-manifest.jsonld#te019$/,
80-
/html-manifest.jsonld#te020$/,
81-
/html-manifest.jsonld#te021$/,
82-
/html-manifest.jsonld#te022$/,
83-
/html-manifest.jsonld#tex01$/,
63+
/html-manifest#te001$/,
64+
/html-manifest#te002$/,
65+
/html-manifest#te003$/,
66+
/html-manifest#te004$/,
67+
/html-manifest#te005$/,
68+
/html-manifest#te006$/,
69+
/html-manifest#te007$/,
70+
/html-manifest#te010$/,
71+
/html-manifest#te011$/,
72+
/html-manifest#te012$/,
73+
/html-manifest#te013$/,
74+
/html-manifest#te014$/,
75+
/html-manifest#te015$/,
76+
/html-manifest#te016$/,
77+
/html-manifest#te017$/,
78+
/html-manifest#te018$/,
79+
/html-manifest#te019$/,
80+
/html-manifest#te020$/,
81+
/html-manifest#te021$/,
82+
/html-manifest#te022$/,
83+
/html-manifest#tex01$/,
8484
// HTML extraction
85-
/expand-manifest.jsonld#thc01$/,
86-
/expand-manifest.jsonld#thc02$/,
87-
/expand-manifest.jsonld#thc03$/,
88-
/expand-manifest.jsonld#thc04$/,
89-
/expand-manifest.jsonld#thc05$/,
85+
/expand-manifest#thc01$/,
86+
/expand-manifest#thc02$/,
87+
/expand-manifest#thc03$/,
88+
/expand-manifest#thc04$/,
89+
/expand-manifest#thc05$/,
9090
// remote
91-
/remote-doc-manifest.jsonld#t0013$/, // HTML
91+
/remote-doc-manifest#t0013$/, // HTML
9292
]
9393
},
9494
fn: 'expand',
@@ -105,13 +105,13 @@ const TEST_TYPES = {
105105
specVersion: ['json-ld-1.0'],
106106
// FIXME
107107
// NOTE: idRegex format:
108-
//MMM-manifest.jsonld#tNNN$/,
108+
//MMM-manifest#tNNN$/,
109109
idRegex: [
110110
// html
111-
/html-manifest.jsonld#tf001$/,
112-
/html-manifest.jsonld#tf002$/,
113-
/html-manifest.jsonld#tf003$/,
114-
/html-manifest.jsonld#tf004$/,
111+
/html-manifest#tf001$/,
112+
/html-manifest#tf002$/,
113+
/html-manifest#tf003$/,
114+
/html-manifest#tf004$/,
115115
]
116116
},
117117
fn: 'flatten',
@@ -129,7 +129,7 @@ const TEST_TYPES = {
129129
specVersion: ['json-ld-1.0'],
130130
// FIXME
131131
// NOTE: idRegex format:
132-
//MMM-manifest.jsonld#tNNN$/,
132+
//MMM-manifest#tNNN$/,
133133
idRegex: [
134134
]
135135
},
@@ -148,11 +148,11 @@ const TEST_TYPES = {
148148
specVersion: ['json-ld-1.0'],
149149
// FIXME
150150
// NOTE: idRegex format:
151-
//MMM-manifest.jsonld#tNNN$/,
151+
//MMM-manifest#tNNN$/,
152152
idRegex: [
153153
// direction (compound-literal)
154-
/fromRdf-manifest.jsonld#tdi11$/,
155-
/fromRdf-manifest.jsonld#tdi12$/,
154+
/fromRdf-manifest#tdi11$/,
155+
/fromRdf-manifest#tdi12$/,
156156
]
157157
},
158158
fn: 'fromRDF',
@@ -177,38 +177,38 @@ const TEST_TYPES = {
177177
specVersion: ['json-ld-1.0'],
178178
// FIXME
179179
// NOTE: idRegex format:
180-
//MMM-manifest.jsonld#tNNN$/,
180+
//MMM-manifest#tNNN$/,
181181
idRegex: [
182182
// well formed
183-
/toRdf-manifest.jsonld#twf05$/,
183+
/toRdf-manifest#twf05$/,
184184
// html
185-
/html-manifest.jsonld#tr001$/,
186-
/html-manifest.jsonld#tr002$/,
187-
/html-manifest.jsonld#tr003$/,
188-
/html-manifest.jsonld#tr004$/,
189-
/html-manifest.jsonld#tr005$/,
190-
/html-manifest.jsonld#tr006$/,
191-
/html-manifest.jsonld#tr007$/,
192-
/html-manifest.jsonld#tr010$/,
193-
/html-manifest.jsonld#tr011$/,
194-
/html-manifest.jsonld#tr012$/,
195-
/html-manifest.jsonld#tr013$/,
196-
/html-manifest.jsonld#tr014$/,
197-
/html-manifest.jsonld#tr015$/,
198-
/html-manifest.jsonld#tr016$/,
199-
/html-manifest.jsonld#tr017$/,
200-
/html-manifest.jsonld#tr018$/,
201-
/html-manifest.jsonld#tr019$/,
202-
/html-manifest.jsonld#tr020$/,
203-
/html-manifest.jsonld#tr021$/,
204-
/html-manifest.jsonld#tr022$/,
185+
/html-manifest#tr001$/,
186+
/html-manifest#tr002$/,
187+
/html-manifest#tr003$/,
188+
/html-manifest#tr004$/,
189+
/html-manifest#tr005$/,
190+
/html-manifest#tr006$/,
191+
/html-manifest#tr007$/,
192+
/html-manifest#tr010$/,
193+
/html-manifest#tr011$/,
194+
/html-manifest#tr012$/,
195+
/html-manifest#tr013$/,
196+
/html-manifest#tr014$/,
197+
/html-manifest#tr015$/,
198+
/html-manifest#tr016$/,
199+
/html-manifest#tr017$/,
200+
/html-manifest#tr018$/,
201+
/html-manifest#tr019$/,
202+
/html-manifest#tr020$/,
203+
/html-manifest#tr021$/,
204+
/html-manifest#tr022$/,
205205
// Invalid Statement
206-
/toRdf-manifest.jsonld#te075$/,
207-
/toRdf-manifest.jsonld#te111$/,
208-
/toRdf-manifest.jsonld#te112$/,
206+
/toRdf-manifest#te075$/,
207+
/toRdf-manifest#te111$/,
208+
/toRdf-manifest#te112$/,
209209
// direction (compound-literal)
210-
/toRdf-manifest.jsonld#tdi11$/,
211-
/toRdf-manifest.jsonld#tdi12$/,
210+
/toRdf-manifest#tdi11$/,
211+
/toRdf-manifest#tdi12$/,
212212
]
213213
},
214214
fn: 'toRDF',
@@ -387,7 +387,7 @@ function addTest(manifest, test, tests) {
387387
// expand @id and input base
388388
const test_id = test['@id'] || test['id'];
389389
//var number = test_id.substr(2);
390-
test['@id'] = manifest.baseIri + basename(manifest.filename) + test_id;
390+
test['@id'] = manifest.baseIri + basename(manifest.filename).replace('.jsonld', '') + test_id;
391391
test.base = manifest.baseIri + test.input;
392392
test.manifest = manifest;
393393
const description = test_id + ' ' + (test.purpose || test.name);

0 commit comments

Comments
 (0)