From 275ab37b2edee3d894d6a781ba97b1219c2dac07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Am=C3=A9rico?= Date: Sun, 21 Aug 2016 17:50:20 -0300 Subject: [PATCH] Fix build in windows --- tasks/test.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tasks/test.js b/tasks/test.js index 18a6c26ba..803fef9fa 100644 --- a/tasks/test.js +++ b/tasks/test.js @@ -5,13 +5,14 @@ module.exports = function(grunt) { grunt.registerTask('test:bin', function() { var done = this.async(); - childProcess.exec('./bin/handlebars -a spec/artifacts/empty.handlebars', function(err, stdout) { + childProcess.exec('node ./bin/handlebars -a spec/artifacts/empty.handlebars', function(err, stdout) { if (err) { throw err; } - var expected = fs.readFileSync('./spec/expected/empty.amd.js'); - if (stdout.toString() !== expected.toString()) { + var expected = fs.readFileSync('./spec/expected/empty.amd.js').toString().replace(/\r\n/g, '\n'); + + if (stdout.toString() !== expected) { throw new Error('Expected binary output differed:\n\n"' + stdout + '"\n\n"' + expected + '"'); }