From 3e1f8197e4c0b2cf1603b4762fb309e5e35cfc8a Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 16 Jun 2010 19:30:21 +0200 Subject: slideshow: Add tests for END, HOME, PageUp and PageDown keys --- test/feh.i | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/test/feh.i b/test/feh.i index 0d65ce3..d08eb72 100755 --- a/test/feh.i +++ b/test/feh.i @@ -3,7 +3,7 @@ use strict; use warnings; use 5.010; -use Test::More tests => 19; +use Test::More tests => 30; use X11::GUITest qw/ FindWindowLike GetWindowName @@ -127,3 +127,32 @@ sleep(0.1); test_win_title($win, 'feh [1 of 3] - test/ok.png'); SendKeys('h'); test_no_win('cycle-once + negative delay + [h]'); + +$win = feh_start(q{}, 'test/ok.png test/ok.gif test/ok.gif test/ok.jpg'); +for (1 .. 2) { + SendKeys('{END}'); + test_win_title($win, 'feh [4 of 4] - test/ok.jpg'); +} +for (1 .. 2) { + SendKeys('{HOM}'); + test_win_title($win, 'feh [1 of 4] - test/ok.png'); +} + +SendKeys('{PGU}'); +test_win_title($win, 'feh [4 of 4] - test/ok.jpg'); +SendKeys('{PGD}'); +test_win_title($win, 'feh [1 of 4] - test/ok.png'); +SendKeys('{PGD}'); +test_win_title($win, 'feh [2 of 4] - test/ok.gif'); + +feh_stop(); + +$win = feh_start(q{}, 'test/ok.png ' x 100); +test_win_title($win, 'feh [1 of 100] - test/ok.png'); +SendKeys('{PGD}'); +test_win_title($win, 'feh [6 of 100] - test/ok.png'); +SendKeys('{PGD}'); +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(); -- cgit v1.2.3