]> git.donarmstrong.com Git - dactyl.git/blob - common/tests/functional/testShellCommands.js
Initial import of 1.0~b6
[dactyl.git] / common / tests / functional / testShellCommands.js
1 var dactyllib = require("utils").module("dactyl");
2
3 var setupModule = function (module) {
4     controller = mozmill.getBrowserController();
5     dactyl = new dactyllib.Controller(controller);
6 };
7
8 var teardownModule = function (module) {
9     dactyl.teardown();
10 }
11
12 var teardownTest = function (test) {
13     dactyl.closeMessageWindow();
14 };
15
16 var testRunCommand_ExecutingOutputCommand_OutputDisplayed = function () {
17     const EXPECTED_OUTPUT = "foobar";
18     const COMMAND = "run echo " + EXPECTED_OUTPUT;
19
20     dactyl.runExCommand(COMMAND);
21
22     dactyl.assertMessageWindow(RegExp(EXPECTED_OUTPUT));
23 };
24
25 var testRunCommand_RepeatArg_LastCommandRepeated = function () {
26     const EXPECTED_OUTPUT = /foobar$/; // XXX
27     const COMMAND = "run echo 'foobar'";
28     const REPEAT_COMMAND = "run!";
29
30     dactyl.runExCommand(COMMAND);
31     dactyl.closeMessageWindow();
32     dactyl.runExCommand(REPEAT_COMMAND);
33
34     dactyl.assertMessageWindow(EXPECTED_OUTPUT);
35 };
36
37 // vim: sw=4 ts=8 et: