summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-06-16 19:19:33 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-06-16 19:19:33 +0200
commitd68b87ed62dc2a439b2d0cc2e4b9e388a1830d02 (patch)
tree796caf11d8c211c8e5f7af36c92ca56393b2f0ac /test
parentec5323982f0b3e6faa33e2210bb79578af5c7935 (diff)
Tests for --cycle-once and --slideshow-delay
Diffstat (limited to 'test')
-rwxr-xr-xtest/feh.i20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/feh.i b/test/feh.i
index bdba62b..0d65ce3 100755
--- a/test/feh.i
+++ b/test/feh.i
@@ -3,7 +3,7 @@ use strict;
use warnings;
use 5.010;
-use Test::More tests => 15;
+use Test::More tests => 19;
use X11::GUITest qw/
FindWindowLike
GetWindowName
@@ -109,3 +109,21 @@ SendKeys('{DEL}');
test_win_title($win, 'feh [1 of 1] - test/ok.jpg');
SendKeys('{DEL}');
test_no_win("Removed all images from slideshow");
+
+feh_start('--cycle-once', 'test/ok.png test/ok.jpg');
+for (1 .. 2) {
+ SendKeys('{RIG}');
+}
+test_no_win("--cycle-once -> window closed");
+
+feh_start('--cycle-once --slideshow-delay 0.5',
+ 'test/ok.png test/ok.jpg test/ok.gif');
+sleep(1);
+test_no_win('cycle-once + slideshow-delay -> window closed');
+
+$win = feh_start('--cycle-once --slideshow-delay -0.01',
+ 'test/ok.png test/ok.jpg test/ok.gif');
+sleep(0.1);
+test_win_title($win, 'feh [1 of 3] - test/ok.png');
+SendKeys('h');
+test_no_win('cycle-once + negative delay + [h]');