From 46e2ca933b606ce7472eaa259b595a7690fabc6b Mon Sep 17 00:00:00 2001 From: Svein Arild Myrer Date: Wed, 3 Oct 2012 21:01:08 +0200 Subject: [PATCH 1/3] getPaths now returns relative paths of test files Returning absolute paths broke the ability to include js files referenced by relative path in test files --- lib/options.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/options.js b/lib/options.js index 639f3cf..7318460 100644 --- a/lib/options.js +++ b/lib/options.js @@ -19,12 +19,10 @@ var path = require('path'), getPaths = function(opt) { var g = glob.sync(opt, { cwd: process.cwd() - }).map(function (filepath) { - return path.join(process.cwd(), filepath); }); if (g && g.length) { - options.paths = [].concat(options.paths, g); - } + options.paths = g; + } }; while (args.length > 0) { From 10c5d6f7a944510ca8a49a3789b7267f2e0eed83 Mon Sep 17 00:00:00 2001 From: Svein Arild Myrer Date: Sat, 6 Oct 2012 13:22:30 +0200 Subject: [PATCH 2/3] Allow to directly reference multiple yui test files on the windows platform On the windows platform it was not possible to start test this way: grover --- lib/options.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/options.js b/lib/options.js index 7318460..0b7c9a9 100644 --- a/lib/options.js +++ b/lib/options.js @@ -21,8 +21,8 @@ var path = require('path'), cwd: process.cwd() }); if (g && g.length) { - options.paths = g; - } + options.paths = options.paths.concat(g); + } }; while (args.length > 0) { From fef630de3d2c99ab2916b02375949105212ebbc2 Mon Sep 17 00:00:00 2001 From: Svein Arild Myrer Date: Sat, 6 Oct 2012 13:32:31 +0200 Subject: [PATCH 3/3] Allow to reference yui test files by advanced glob patterns on *nix Glob patterns such as /**/*.html was not supported on *nix-platforms. This is now introduced by the -g argument. --- lib/options.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/options.js b/lib/options.js index 0b7c9a9..0a0a0d5 100644 --- a/lib/options.js +++ b/lib/options.js @@ -15,7 +15,7 @@ var path = require('path'), run: true, quiet: false, exitOnFail: false - }, newPath, paths, a, p, t, v, concurrent, + }, newPath, paths, a, p, t, v, concurrent, globPattern, getPaths = function(opt) { var g = glob.sync(opt, { cwd: process.cwd() @@ -92,6 +92,10 @@ var path = require('path'), throw('-p requires an argument'); } break; + case "-g": + globPattern = args.shift(); + getPaths(globPattern); + break; case "-f": case "--fail": options.exitOnFail = true; @@ -122,6 +126,7 @@ var path = require('path'), console.log(' as the list of files to process.'); console.log(' -p, --prefix String to prefix to all urls (for dynamic server names)'); console.log(' -S, --suffix String to add to the end of all urls (for dynamic server names)'); + console.log(' -g retrieve yui test files by a specified glob pattern'); console.log(' -o, --outfile '); console.log(' You can specify an export type with the following:'); console.log(' --tap TAP export (default)');