From 834102fb7b881ee579621244b52372a550f7daac Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Sun, 2 Apr 2017 02:59:02 +0800 Subject: [PATCH] improve usability of help --- test/ufuzz.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/ufuzz.js b/test/ufuzz.js index 9a110c6b..bd110c3e 100644 --- a/test/ufuzz.js +++ b/test/ufuzz.js @@ -110,6 +110,8 @@ for (var i = 2; i < process.argv.length; ++i) { STMTS_TO_USE = STMTS_TO_USE.filter(function(id){ return id !== omit; }) }); break; + case '--help': + case '-h': case '-?': console.log('** UglifyJS fuzzer help **'); console.log('Valid options (optional):'); @@ -128,7 +130,7 @@ for (var i = 2; i < process.argv.length; ++i) { return 0; default: // first arg may be a number. - if (i > 2 || !parseInt(process.argv[i], 10)) throw new Error('Unknown argument[' + process.argv[i] + ']; see -? for help'); + if (i > 2 || !parseInt(process.argv[i], 10)) throw new Error('Unknown argument[' + process.argv[i] + ']; see -h for help'); } }