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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user