Skip to content
Snippets Groups Projects
Commit 36dfb63b authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Some primitive tests for thumbnail mode

parent 73939a92
No related branches found
No related tags found
No related merge requests found
...@@ -3,17 +3,11 @@ use strict; ...@@ -3,17 +3,11 @@ use strict;
use warnings; use warnings;
use 5.010; use 5.010;
use Test::More tests => 30; use Test::More tests => 34;
use X11::GUITest qw/ use X11::GUITest qw/:ALL/;
FindWindowLike
GetWindowName
SetInputFocus
SendKeys
StartApp
WaitWindowViewable
/;
my $win; my $win;
my ($width, $height);
sub feh_start { sub feh_start {
my ($opts, $files) = @_; my ($opts, $files) = @_;
...@@ -162,3 +156,17 @@ test_win_title($win, 'feh [11 of 100] - test/ok.png'); ...@@ -162,3 +156,17 @@ test_win_title($win, 'feh [11 of 100] - test/ok.png');
SendKeys('{HOM PGU}'); SendKeys('{HOM PGU}');
test_win_title($win, 'feh [96 of 100] - test/ok.png'); test_win_title($win, 'feh [96 of 100] - test/ok.png');
feh_stop(); 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();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment