diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2011-08-04 18:43:11 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2011-08-04 18:43:11 +0400 |
commit | f9cfd709460e04c8417e7784e6e3b264d3ff6c69 (patch) | |
tree | 4ea24887229f16df3cb41c278a2e6517c97d7e9f /test | |
parent | 0c4e7354011ec3dd419a8f0364ada28a3c3a0bf1 (diff) |
test: fix bad test in test-cli-eval.js
The test checked that stdout was empty. Forgetting to escape brackets
in the argument to --eval made that true on UNIX systems: the error
was written to stderr.
Props to Peter Bright for reporting the issue.
Diffstat (limited to 'test')
-rw-r--r-- | test/simple/test-cli-eval.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/simple/test-cli-eval.js b/test/simple/test-cli-eval.js index 6590442aadb..bf6271bea48 100644 --- a/test/simple/test-cli-eval.js +++ b/test/simple/test-cli-eval.js @@ -36,10 +36,10 @@ child.exec(nodejs + ' --eval 42', assert.equal(stdout, ''); }); -// assert that nothing is written to stdout -child.exec(nodejs + ' --eval console.log(42)', +// 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"); }); // assert that module loading works |