Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2011-08-04 18:43:11 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2011-08-04 18:43:11 +0400
commitf9cfd709460e04c8417e7784e6e3b264d3ff6c69 (patch)
tree4ea24887229f16df3cb41c278a2e6517c97d7e9f /test
parent0c4e7354011ec3dd419a8f0364ada28a3c3a0bf1 (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.js6
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