diff --git a/test/fixtures/test.pdf b/test/fixtures/test.pdf new file mode 100644 index 0000000..982f6ea Binary files /dev/null and b/test/fixtures/test.pdf differ diff --git a/test/pdf.js b/test/pdf.js new file mode 100644 index 0000000..6f39716 --- /dev/null +++ b/test/pdf.js @@ -0,0 +1,15 @@ +const assert = require('assert'); +const path = require('path'); +const fs = require('fs') + +module.exports = function (_, dir, finish, gm, imageMagick) { + if (!gm.integration) return finish(); + + var imagePath = path.join(__dirname, 'fixtures', 'test.pdf'); + var inputStream = fs.createReadStream(imagePath); + gm(inputStream).options({ imageMagick }).identify('%p', function(err, value) { + if (err) return finish(err); + assert.equal(value, '1'); + finish(); + }); +}