diff options
| author | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-18 13:23:16 +0200 | 
|---|---|---|
| committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-18 13:23:16 +0200 | 
| commit | c2c3d5e466331fe1453a8af70f61c91714d363ca (patch) | |
| tree | 802c2590742f24996de3299ac41ce4c307206615 /test | |
| parent | 2039632c52562e407575936ca0ea2b4b430ef024 (diff) | |
Test for the w key
Diffstat (limited to 'test')
| -rwxr-xr-x | test/feh.i | 20 | 
1 files changed, 19 insertions, 1 deletions
| @@ -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(); | 
