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

Add a half slew of generic command execution/completion/code coverage tests. Add unhandled exception checking to tests. Fix some detected merge artifacts.

This commit is contained in:
Kris Maglione
2011-01-28 21:59:48 -05:00
parent 5cba6cbc77
commit 199604041b
14 changed files with 422 additions and 64 deletions

View File

@@ -5,6 +5,10 @@ var setupModule = function (module) {
dactyl = new dactyllib.Controller(controller);
};
var teardownModule = function (module) {
dactyl.teardown();
}
var teardownTest = function (test) {
dactyl.closeMessageWindow();
};
@@ -56,13 +60,18 @@ var testEchoCommand_ObjectArgumentAndClosedMOW_MessageDisplayedInMOW = function
});
};
function executeCommand(command) {
dactyl.runViCommand(":" + command);
dactyl.runViCommand([["VK_RETURN"]]);
}
function assertEchoGeneratesWindowOutput({ ECHO_COMMAND, EXPECTED_OUTPUT }) {
dactyl.runExCommand(ECHO_COMMAND);
executeCommand(ECHO_COMMAND);
dactyl.assertMessageWindow(EXPECTED_OUTPUT);
}
function assertEchoGeneratesLineOutput({ ECHO_COMMAND, EXPECTED_OUTPUT }) {
dactyl.runExCommand(ECHO_COMMAND);
executeCommand(ECHO_COMMAND);
dactyl.assertMessageLine(EXPECTED_OUTPUT);
}