Ben Noordhuis
185c515c9f
src: clean up CLI argument parser
...
* Exit with an error message when the option is not a node or V8 option.
* Remove the option_end_index global. Needs to happen anyway for
the multi-context work, might as well land it in master now.
* Add a smidgen of const-correctness.
* Pay off a few years of accrued technical debt.
2013-09-02 21:41:12 +02:00
Ben Noordhuis
19a432260c
test: add extra checks in simple/test-cli-eval
2012-09-04 14:41:08 +02:00
Ben Noordhuis
83b1dda12f
cli: make argument to -p optional
2012-09-04 14:39:31 +02:00
Ben Noordhuis
f03c3203a1
cli: make -p equivalent to -pe
...
Fixes #3938 .
2012-09-03 16:42:20 +02:00
isaacs
b3cf3f35fc
Report errors properly from --eval and stdin
2012-07-30 08:21:39 -07:00
Ben Noordhuis
0888cdd412
test: fix bad comment
2012-05-22 16:14:30 +02:00
Ben Noordhuis
3d22dbf27b
cli: add -p switch, print result of --eval
2011-12-01 18:02:15 +01:00
Colton Baker
87286cc737
Fixed a lot of jslint errors.
...
Fixes #1831
2011-10-05 18:51:06 -07:00
Bert Belder
10e7c52a70
win: make test-cli-eval.js pass
2011-09-11 03:52:44 +02:00
Ryan Dahl
4e1d6fca8e
Mark tests which are broken in libuv
2011-08-23 23:45:21 -07:00
Ben Noordhuis
f9cfd70946
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.
2011-08-04 16:43:11 +02:00
Ben Noordhuis
df3a8fcb62
cli: don't print result of --eval
...
Fixes #572 .
2011-07-25 23:59:10 +02:00
Fuji, Goro
8971b59365
node -e ''
should mean eval(''), not invoke REPL
...
Fixes #1116
2011-05-31 22:10:39 -07:00
Ryan Dahl
55048cdf79
Update copyright headers
2011-03-14 17:37:05 -07:00
Carter Allen
5ad93ab573
Fix tests when spaces are in path
2011-01-25 12:56:35 -08:00
Oleg Efimov
0665f0271e
GJSLint all simple tests exclude http-*, url, path
2010-12-05 15:41:58 -08:00
Ben Noordhuis
f0b8cc6a94
require() should work with node --eval
.
...
with tests
Fix module path resolve bug. Normally the module path is taken from
realpath(__filename) but with eval there is (of course) no filename
2010-11-21 20:24:26 -08:00