From 7ed9f65e584fae8823b957c07b2f467918d42682 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Thu, 17 Jun 2010 01:55:27 -0400 Subject: [PATCH] (api) '-m' and '-r' now require a space between pattern --- bin/vows | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/vows b/bin/vows index 59d1d7a..37b8ff7 100755 --- a/bin/vows +++ b/bin/vows @@ -64,13 +64,13 @@ while (arg = argv.shift()) { arg = arg.match(/^--?(.+)/)[1]; if (arg[0] === 'r') { - options.matcher = new(RegExp)(arg.slice(1)); + options.matcher = new(RegExp)(argv.shift()); } else if (arg[0] === 'm') { options.matcher = (function (str) { // Create an escaped RegExp var specials = '. * + ? | ( ) [ ] { } \\ ^ ? ! = : $'.split(' ').join('|\\'), regex = new(RegExp)('(\\' + specials + ')', 'g'); return new(RegExp)(str.replace(regex, '\\$1')); - })(arg.slice(1)); + })(argv.shift()); } else if (arg in options) { options[arg] = true; } else {