diff --git a/bin/marked b/bin/marked index f72bfa00db..c479ed8e24 100755 --- a/bin/marked +++ b/bin/marked @@ -78,7 +78,7 @@ function main(argv, callback) { arg = getarg(); switch (arg) { case '--test': - return require('../test').main(process.argv.slice()); + return require('../test').main(process.argv); case '-o': case '--output': output = argv.shift(); diff --git a/man/marked.1 b/man/marked.1 index 35ae794c93..69660afa9f 100644 --- a/man/marked.1 +++ b/man/marked.1 @@ -53,7 +53,9 @@ Benchmarks the test(s). Times The test(s). .PP .B \-\-minified -Runs test file(s) as minified. +Runs test file(s) as minified. +.B \-\-stop +Stop process if a test fails. .RE .TP .BI \-t,\ \-\-tokens diff --git a/man/marked.1.txt b/man/marked.1.txt index caeef7e6d1..3c9bd36207 100644 --- a/man/marked.1.txt +++ b/man/marked.1.txt @@ -36,7 +36,7 @@ OPTIONS --time Times The test(s). - --minified Runs test file(s) as minified. + --minified Runs test file(s) as minified. --stop Stop process if a test fails. -t, --tokens Output a token stream instead of html. diff --git a/test/index.js b/test/index.js index 9d1cf57af3..8e2f30c0bd 100644 --- a/test/index.js +++ b/test/index.js @@ -447,6 +447,7 @@ function parseArg(argv) { orphans = [], arg; + argv = argv.slice(2); function getarg() { var arg = argv.shift(); @@ -581,7 +582,7 @@ function main(argv) { if (!module.parent) { process.title = 'marked'; - process.exit(main(process.argv.slice()) ? 0 : 1); + process.exit(main(process.argv) ? 0 : 1); } else { exports = main; exports.main = main;