From c2c3d5e466331fe1453a8af70f61c91714d363ca Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 18 Jun 2010 13:23:16 +0200 Subject: Test for the w key --- test/feh.i | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'test') 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(); -- cgit v1.2.3