summaryrefslogtreecommitdiff
path: root/test/feh.i
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-06-18 13:23:16 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-06-18 13:23:16 +0200
commitc2c3d5e466331fe1453a8af70f61c91714d363ca (patch)
tree802c2590742f24996de3299ac41ce4c307206615 /test/feh.i
parent2039632c52562e407575936ca0ea2b4b430ef024 (diff)
Test for the w key
Diffstat (limited to 'test/feh.i')
-rwxr-xr-xtest/feh.i20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/feh.i b/test/feh.i
index f91bd0f..6adc901 100755
--- a/test/feh.i
+++ b/test/feh.i
@@ -4,7 +4,7 @@ use warnings;
use 5.010;
use Cwd;
-use Test::More tests => 60;
+use Test::More tests => 63;
use Time::HiRes qw/sleep/;
use X11::GUITest qw/:ALL/;
@@ -284,3 +284,21 @@ $win = feh_start('--geometry 423x232');
is($width, 423, '--geometry: correct width');
is($height, 232, '--geometry: correct height');
feh_stop();
+
+$win = feh_start();
+(undef, undef, $width, $height) = GetWindowPos($win);
+is($width, 16, 'correct default window width');
+is($height, 16, 'correct default window height');
+
+ResizeWindow($win, 25, 30);
+(undef, undef, $width, $height) = GetWindowPos($win);
+
+SKIP: {
+ if (not ([$width, $height] ~~ [25, 30])) {
+ skip('ResizeWindow failed', 2)
+ }
+ PressKey('w');
+ ok(waitfor { [(GetWindowPos($win))[2, 3]] ~~ [16, 16] },
+ 'w key resizes correctly');
+}
+feh_stop();