1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 18:54:12 +01:00

fixed regression test counting

This commit is contained in:
Martin Stubenschrott
2008-11-24 23:25:27 +00:00
parent 0fdbf53fea
commit 75120e0e04

View File

@@ -108,7 +108,8 @@ commands.addUserCommand(["regr[essions]"],
// 1.) run commands and mappings tests
for (let [, test] in Iterator(tests))
{
if (count >= 1 && ++currentTest != count)
currentTest++;
if (count >= 1 && currentTest != count)
continue;
let testDescription = util.clip(test.cmds.join(" -> "), 80);
@@ -133,7 +134,8 @@ commands.addUserCommand(["regr[essions]"],
// 2.) Run function tests
for (let [, func] in Iterator(functions))
{
if (count >= 1 && ++currentTest != count)
currentTest++;
if (count >= 1 && currentTest != count)
continue;
liberator.echomsg("Running test " + currentTest + " of " + totalTests + ": " + util.clip(func.toString().replace(/[\s\n]+/gm, " "), 80));