summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-06-24 16:30:00 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-06-24 16:30:00 +0200
commit1811640837de4136c4976b16ede8fcb955daf070 (patch)
tree82e6f3074b7f6bc020ea001c98c4e219a34051e2
parentfa90c79fe33e9a016dd9d8117fcd7031303b5587 (diff)
Add tests for --thumb-title (+Update TODO cause there's more borkage with it)
-rw-r--r--TODO2
-rwxr-xr-xtest/feh.i14
2 files changed, 10 insertions, 6 deletions
diff --git a/TODO b/TODO
index 92ad7e7..98a1328 100644
--- a/TODO
+++ b/TODO
@@ -25,7 +25,7 @@ GUI-toolkit or similar (or maybe writing a completely new tool for that and
removing the feature from feh) would be due.
Saving the filelist from thumbnail mode is not possible. I wonder if this
-matters enough to be fixed.
+matters enough to be fixed. %u is borked there for the same reason.
Maybe: Zoom mode like --bg-fill?
diff --git a/test/feh.i b/test/feh.i
index fc14a79..9512442 100755
--- a/test/feh.i
+++ b/test/feh.i
@@ -4,7 +4,7 @@ use warnings;
use 5.010;
use Cwd;
-use Test::More tests => 67;
+use Test::More tests => 70;
use Time::HiRes qw/sleep/;
use X11::GUITest qw/:ALL/;
@@ -199,27 +199,31 @@ 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');
+$win = feh_start('--thumbnails --thumb-title "%P [%l] %f"',
+ '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$});
+($win) = WaitWindowViewable(qr{test/ok\.png$});
ok($win, 'Thumbnail mode: Window opened');
+test_win_title($win, 'feh [3] test/ok.png');
SetInputFocus($win);
SendKeys('x');
ok(waitfor { not FindWindowLike(qr{^ok\.png$}) }, 'Thumbnail mode: closed');
MoveMouseAbs(90, 30);
ClickMouseButton(M_BTN1);
-($win) = WaitWindowViewable(qr{^ok\.gif$});
+($win) = WaitWindowViewable(qr{test/ok\.gif$});
ok($win, 'Thumbnail mode: Window opened');
+test_win_title($win, 'feh [3] test/ok.gif');
MoveMouseAbs(150,30);
ClickMouseButton(M_BTN1);
-($win) = WaitWindowViewable(qr{^ok\.jpg$});
+($win) = WaitWindowViewable(qr{test/ok\.jpg$});
ok($win, 'Thumbnail mode: Other window opened');
+test_win_title($win, 'feh [3] test/ok.jpg');
feh_stop();