mirror of https://github.com/nodejs/node.git
test: fix simple/test-eval
Test expects output of console.error(process.argv) to be spread out over several lines but if /path/to/node is short, it stays on a single line.v0.7.4-release
parent
52a40e0fd5
commit
accc34c50f
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
require('../common');
|
require('../common');
|
||||||
|
var util = require('util');
|
||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
var exec = require('child_process').exec;
|
var exec = require('child_process').exec;
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@ var success_count = 0;
|
||||||
var error_count = 0;
|
var error_count = 0;
|
||||||
|
|
||||||
var cmd = [process.execPath, '-e', '"console.error(process.argv)"', 'foo', 'bar'].join(' ');
|
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) {
|
var child = exec(cmd, function(err, stdout, stderr) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(err.toString());
|
console.log(err.toString());
|
||||||
|
|
Loading…
Reference in New Issue