diff --git a/test/simple/test-eval.js b/test/simple/test-eval.js index 94f5c38b38..4d55556686 100644 --- a/test/simple/test-eval.js +++ b/test/simple/test-eval.js @@ -23,6 +23,7 @@ require('../common'); +var util = require('util'); var assert = require('assert'); var exec = require('child_process').exec; @@ -30,7 +31,7 @@ var success_count = 0; var error_count = 0; var cmd = [process.execPath, '-e', '"console.error(process.argv)"', 'foo', 'bar'].join(' '); -var expected = "[ '" + process.execPath + "',\n 'foo',\n 'bar' ]\n"; +var expected = util.format([process.execPath, 'foo', 'bar']) + "\n"; var child = exec(cmd, function(err, stdout, stderr) { if (err) { console.log(err.toString());