Skip to content

Commit

Permalink
add --stop to --time man doc & changed parseArg(argv) parameter stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
x13machine committed Mar 11, 2019
1 parent cbc240a commit 05d29c8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/marked
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion man/marked.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion man/marked.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ function parseArg(argv) {
orphans = [],
arg;

argv = argv.slice(2);
function getarg() {
var arg = argv.shift();

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 05d29c8

Please sign in to comment.