|
|
@ -39,11 +39,13 @@ var filename = __filename.replace(/\\/g, '/'); |
|
|
|
child.exec(nodejs + ' --eval 42', |
|
|
|
function(err, stdout, stderr) { |
|
|
|
assert.equal(stdout, ''); |
|
|
|
assert.equal(stderr, ''); |
|
|
|
}); |
|
|
|
|
|
|
|
// assert that "42\n" is written to stderr
|
|
|
|
child.exec(nodejs + ' --eval "console.error(42)"', |
|
|
|
function(err, stdout, stderr) { |
|
|
|
assert.equal(stdout, ''); |
|
|
|
assert.equal(stderr, '42\n'); |
|
|
|
}); |
|
|
|
|
|
|
@ -54,11 +56,13 @@ child.exec(nodejs + ' --eval "console.error(42)"', |
|
|
|
child.exec(cmd + '42', |
|
|
|
function(err, stdout, stderr) { |
|
|
|
assert.equal(stdout, '42\n'); |
|
|
|
assert.equal(stderr, ''); |
|
|
|
}); |
|
|
|
|
|
|
|
child.exec(cmd + "'[]'", |
|
|
|
function(err, stdout, stderr) { |
|
|
|
assert.equal(stdout, '[]\n'); |
|
|
|
assert.equal(stderr, ''); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
@ -84,4 +88,5 @@ child.exec(nodejs + ' -e ""', function(status, stdout, stderr) { |
|
|
|
child.exec(nodejs + ' -p "\\-42"', |
|
|
|
function(err, stdout, stderr) { |
|
|
|
assert.equal(stdout, '-42\n'); |
|
|
|
assert.equal(stderr, ''); |
|
|
|
}); |
|
|
|