From f12d94a6282d9efe6ba5863bf0de8a8a8b09a4af Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Thu, 24 Apr 2008 20:08:50 +0000 Subject: [PATCH] testrunner: refactored url-test-filter, still regex based --- test/data/testrunner.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/data/testrunner.js b/test/data/testrunner.js index eabcd8e6f..6f426419b 100644 --- a/test/data/testrunner.js +++ b/test/data/testrunner.js @@ -54,6 +54,11 @@ function start() { }, 13); } +function dontrun(name) { + var filter = location.search.slice(1); + return filter && !new RegExp(filter).test(encodeURIComponent(name)); +} + function runTest() { _config.blocking = false; var time = new Date(); @@ -73,8 +78,7 @@ function test(name, callback, nowait) { if(_config.currentModule) name = _config.currentModule + " module: " + name; - var filter = location.search.slice(1); - if ( filter && !new RegExp(filter).test(encodeURIComponent(name)) ) + if (dontrun(name)) return; synchronize(function() { -- 2.39.5