Skip to content

Commit

Permalink
Merge pull request #13996 from Snuffleupagus/downloadutils-link-check
Browse files Browse the repository at this point in the history
Make `verifyManifestFiles` fail for non-linked test-cases with a `"link": true`-entry
  • Loading branch information
Snuffleupagus committed Sep 10, 2021
2 parents 57b8007 + d60cc72 commit 5678c75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 9 additions & 0 deletions test/downloadutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ function verifyManifestFiles(manifest, callback) {
verifyNext();
return;
}
if (item.link && !fs.existsSync(item.file + ".link")) {
console.error(
`WARNING: Unneeded \`"link": true\`-entry for the "${item.id}" test.`
);
error = true;
i++;
verifyNext();
return;
}
calculateMD5(item.file, function (err, md5) {
if (err) {
console.log('WARNING: Unable to open file for reading "' + err + '".');
Expand Down
2 changes: 0 additions & 2 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3490,7 +3490,6 @@
"md5": "8039aba56790d3597d2bc8c794a51301",
"rounds": 1,
"lastPage": 5,
"link": true,
"type": "eq"
},
{ "id": "text_clip_cff_cid",
Expand Down Expand Up @@ -3564,7 +3563,6 @@
"file": "pdfs/issue925.pdf",
"md5": "f58fe943090aff89dcc8e771bc0db4c2",
"rounds": 1,
"link": true,
"type": "eq"
},
{ "id": "issue9291",
Expand Down

0 comments on commit 5678c75

Please sign in to comment.