[Pkg-javascript-commits] [pdf.js] 303/414: Allow unit-tests to use linked PDF files, by having the `unittest` command download unavailable ones (issue 7117)
David Prévot
taffit at moszumanska.debian.org
Tue Jun 28 17:12:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 8f097abb46ed469bd3d36596222a6f4db915c4e1
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Sat Mar 26 17:41:13 2016 +0100
Allow unit-tests to use linked PDF files, by having the `unittest` command download unavailable ones (issue 7117)
---
make.js | 3 ++-
test/test.js | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/make.js b/make.js
index c70b1a0..b3251d7 100644
--- a/make.js
+++ b/make.js
@@ -1249,6 +1249,7 @@ target.unittest = function(options, callback) {
echo();
echo('### Running unit tests');
+ var PDF_TEST = env['PDF_TEST'] || 'test_manifest.json';
var PDF_BROWSERS = env['PDF_BROWSERS'] ||
'resources/browser_manifests/browser_manifest.json';
@@ -1260,7 +1261,7 @@ target.unittest = function(options, callback) {
callback = callback || function() {};
cd('test');
exec('node test.js --unitTest --browserManifestFile=' +
- PDF_BROWSERS, {async: true}, callback);
+ PDF_BROWSERS + ' --manifestFile=' + PDF_TEST, {async: true}, callback);
};
//
diff --git a/test/test.js b/test/test.js
index 1d13de1..f82937b 100644
--- a/test/test.js
+++ b/test/test.js
@@ -730,7 +730,9 @@ function main() {
} else if (!options.browser && !options.browserManifestFile) {
startServer();
} else if (options.unitTest) {
- startUnitTest('/test/unit/unit_test.html', 'unit');
+ ensurePDFsDownloaded(function() { // Allows linked PDF files in unit-tests.
+ startUnitTest('/test/unit/unit_test.html', 'unit');
+ });
} else if (options.fontTest) {
startUnitTest('/test/font/font_test.html', 'font');
} else {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list