diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-16 23:19:43 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-16 23:19:43 +0200 |
commit | 36dfb63bdf3f3297d7da53e634d6dd00b93b24d3 (patch) | |
tree | 866e94c8d27425b14bf71ec2998f8040b72dc810 /test | |
parent | 73939a927fe02052c346c17005eeb517c3e00b87 (diff) |
Some primitive tests for thumbnail mode
Diffstat (limited to 'test')
-rwxr-xr-x | test/feh.i | 26 |
1 files changed, 17 insertions, 9 deletions
@@ -3,17 +3,11 @@ use strict; use warnings; use 5.010; -use Test::More tests => 30; -use X11::GUITest qw/ - FindWindowLike - GetWindowName - SetInputFocus - SendKeys - StartApp - WaitWindowViewable -/; +use Test::More tests => 34; +use X11::GUITest qw/:ALL/; my $win; +my ($width, $height); sub feh_start { my ($opts, $files) = @_; @@ -162,3 +156,17 @@ test_win_title($win, 'feh [11 of 100] - test/ok.png'); SendKeys('{HOM PGU}'); test_win_title($win, 'feh [96 of 100] - test/ok.png'); feh_stop(); + +$win = feh_start('--thumbnails', 'test/ok.png test/ok.gif test/ok.jpg'); +test_win_title($win, 'feh [thumbnail mode]'); +$width = (GetWindowPos($win))[2]; +is($width, 640, 'thumbnail win: Correct default size'); +MoveMouseAbs(30, 30); +ClickMouseButton(M_BTN1); +($win) = WaitWindowViewable(qr{^ok\.png$}); +ok($win, 'Thumbnail mode: Window opened'); +SetInputFocus($win); +SendKeys('x'); +sleep(0.2); +is(FindWindowLike(qr{^ok\.png$}), 0, 'Thumbnail mode: Window closed (x)'); +feh_stop(); |