Permalink
Browse files

tests; fix tests on absolute paths

  • Loading branch information...
1 parent a76c8b2 commit c832ab0425c7121ac4f9f463881144fbaf6361c5 @aheckmann committed Dec 14, 2012
Showing with 13 additions and 13 deletions.
  1. +5 −5 test/append.js
  2. +4 −4 test/gravity.js
  3. +2 −2 test/polygon.js
  4. +2 −2 test/polyline.js
View
@@ -15,9 +15,9 @@ module.exports = function (_, dir, next, gm) {
var args = m.args();
assert.equal('convert', args[0]);
- assert.equal('/Users/aaronheckmann/test/gm/gm/test/../examples/imgs/lost.png',args[1]);
- assert.equal('/Users/aaronheckmann/test/gm/gm/test/../examples/imgs/original.jpg',args[2]);
- assert.equal('/Users/aaronheckmann/test/gm/gm/test/../examples/imgs/original.jpg',args[3]);
+ assert.ok(/examples\/imgs\/lost\.png$/.test(args[1]));
+ assert.ok(/examples\/imgs\/original\.jpg$/,args[2]);
+ assert.ok(/examples\/imgs\/original\.jpg$/,args[3]);
assert.equal('-background',args[4]);
assert.equal('#222',args[5]);
assert.equal('-append',args[6]);
@@ -46,8 +46,8 @@ function horizontal (dir, next, gm) {
var args = m.args();
assert.equal('convert', args[0]);
- assert.equal('/Users/aaronheckmann/test/gm/gm/test/../examples/imgs/original.jpg',args[1]);
- assert.equal('/Users/aaronheckmann/test/gm/gm/test/../examples/imgs/lost.png',args[2]);
+ assert.ok(/examples\/imgs\/original\.jpg$/.test(args[1]));
+ assert.ok(/examples\/imgs\/lost\.png$/.test(args[2]));
assert.equal('+append',args[3]);
assert.equal('-',args[4]);
View
@@ -10,11 +10,11 @@ module.exports = function (img, dir, finish, gm) {
.extent(300,300);
var args = m.args();
+ assert.equal('convert', args[0]);
+ assert.equal('-size', args[1]);
+ assert.equal('300x300', args[2]);
+ args= args.slice(4);
assert.deepEqual(args, [
- 'convert',
- '-size',
- '300x300',
- '/Users/aaronheckmann/test/gm/gm/test/../examples/imgs/original.jpg',
'-scale',
'200x100',
'-gravity',
View
@@ -10,9 +10,9 @@ module.exports = function (gm, dir, finish, GM) {
.drawPolygon([60, 10], [183, 73], [185, 13], [167, 35], [165, 17], [163, 19]);
var args = m.args();
+ assert.equal('convert', args[0]);
+ args = args.slice(2);
assert.deepEqual(args, [
- 'convert',
- '/Users/aaronheckmann/test/gm/gm/test/../examples/imgs/original.jpg',
'-blur',
'8x4',
'-strokewidth',
View
@@ -10,9 +10,9 @@ module.exports = function (gm, dir, finish, GM) {
.drawPolyline([40, 10], [143, 153], [185, 53], [147, 15], [145, 17], [43, 19]);
var args = m.args();
+ assert.equal('convert', args[0]);
+ args = args.slice(2);
assert.deepEqual(args, [
- 'convert',
- '/Users/aaronheckmann/test/gm/gm/test/../examples/imgs/original.jpg',
'-blur',
'8x4',
'-strokewidth',

0 comments on commit c832ab0

Please sign in to comment.