mirror of https://gitgud.io/fatchan/gm
test for issue #127
parent
134e93562b
commit
7072740e6b
1 changed files with 30 additions and 0 deletions
@ -0,0 +1,30 @@ |
||||
// https://github.com/aheckmann/gm/issues/127
|
||||
|
||||
var assert = require('assert') |
||||
var fs = require('fs') |
||||
|
||||
module.exports = function (_, dir, finish, gm) { |
||||
if (!gm.integration) |
||||
return finish(); |
||||
|
||||
createImage().write(dir + '/ignore.me.png', function (err) { |
||||
if (err) return finish(err); |
||||
|
||||
createImage().stream(function (err, stdout) { |
||||
if (err) return finish(err); |
||||
|
||||
stdout.pipe(fs.createWriteStream(dir + '/ignore.me.2.png')) |
||||
|
||||
stdout.on('error', finish) |
||||
stdout.on('end', finish) |
||||
}) |
||||
}) |
||||
|
||||
function createImage() { |
||||
return gm(70, 30, '#000') |
||||
.font("arial", 20) |
||||
.stroke("#fff", 2) |
||||
.fill("#888") |
||||
.drawText(10, 22, 'Some text') |
||||
} |
||||
} |
Loading…
Reference in new issue