Improve --help message and Fix -e/--eval switch
authorSteve Engledow <steve.engledow@proxama.com>
Tue, 5 Jul 2011 11:07:08 +0000 (12:07 +0100)
committerkoichik <koichik@improvement.jp>
Sat, 16 Jul 2011 06:24:36 +0000 (15:24 +0900)
commit292345fe626bc4185e8bb1c41bf3f859f48b3bd4
treec681774ca8096ffed0ca1dbc51c5ea08a5910f28
parent4662ace9165ae6d8aab06ba7ef3ffff4c971c859
Improve --help message and Fix -e/--eval switch

--help should at least give some hint that node takes the -e switch

Update help message to include -e and swap eval block with module load block so argv works correctly

[steve@sane node](master)$ ./node -e 'process.argv' foo bar
[ '/home/steve/code/node/node', 'foo', 'bar' ]

:)

Add simple test for -e option.

Fixes #1311.
src/node.cc
src/node.js
test/simple/test-eval.js [new file with mode: 0644]