Skip to content

Commit 05d29c8

Browse files
committed
add --stop to --time man doc & changed parseArg(argv) parameter stuff
1 parent cbc240a commit 05d29c8

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

bin/marked

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function main(argv, callback) {
7878
arg = getarg();
7979
switch (arg) {
8080
case '--test':
81-
return require('../test').main(process.argv.slice());
81+
return require('../test').main(process.argv);
8282
case '-o':
8383
case '--output':
8484
output = argv.shift();

man/marked.1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ Benchmarks the test(s).
5353
Times The test(s).
5454
.PP
5555
.B \-\-minified
56-
Runs test file(s) as minified.
56+
Runs test file(s) as minified.
57+
.B \-\-stop
58+
Stop process if a test fails.
5759
.RE
5860
.TP
5961
.BI \-t,\ \-\-tokens

man/marked.1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ OPTIONS
3636

3737
--time Times The test(s).
3838

39-
--minified Runs test file(s) as minified.
39+
--minified Runs test file(s) as minified. --stop Stop process if a test fails.
4040

4141
-t, --tokens
4242
Output a token stream instead of html.

test/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ function parseArg(argv) {
447447
orphans = [],
448448
arg;
449449

450+
argv = argv.slice(2);
450451
function getarg() {
451452
var arg = argv.shift();
452453

@@ -581,7 +582,7 @@ function main(argv) {
581582

582583
if (!module.parent) {
583584
process.title = 'marked';
584-
process.exit(main(process.argv.slice()) ? 0 : 1);
585+
process.exit(main(process.argv) ? 0 : 1);
585586
} else {
586587
exports = main;
587588
exports.main = main;

0 commit comments

Comments
 (0)