summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-06-18 12:58:12 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-06-18 12:58:12 +0200
commitc423cd2c5a8bed07f2d48f8378a6b8695ad53c9b (patch)
tree344c8c44fb040d68616084dcad96d6b71bbb0ebb
parent86673296e39ae9168c459e3309b20effd69cfa9a (diff)
Basic filelist tests
-rwxr-xr-xtest/feh.i21
1 files changed, 20 insertions, 1 deletions
diff --git a/test/feh.i b/test/feh.i
index 6519401..f84c5b9 100755
--- a/test/feh.i
+++ b/test/feh.i
@@ -3,12 +3,14 @@ use strict;
use warnings;
use 5.010;
-use Test::More tests => 55;
+use Cwd;
+use Test::More tests => 58;
use Time::HiRes qw/sleep/;
use X11::GUITest qw/:ALL/;
my $win;
my ($width, $height);
+my $pwd = getcwd();
sub waitfor(&) {
my ($sub) = @_;
@@ -259,3 +261,20 @@ is(slurp('test/.captions/ok.png.txt'), "Foo Bar\nmiep",
unlink('test/.captions/ok.png.txt');
rmdir('test/.captions');
+
+$win = feh_start('--filelist test/filelist',
+ 'test/ok.png test/ok.gif test/ok.png test/ok.jpg');
+SendKeys('{DEL}');
+test_win_title($win, "feh [1 of 3] - ${pwd}/test/ok.gif");
+feh_stop();
+
+is(slurp('test/filelist'), <<"EOF", 'Filelist saved');
+${pwd}/test/ok.gif
+${pwd}/test/ok.png
+${pwd}/test/ok.jpg
+EOF
+
+$win = feh_start('--filelist test/filelist', q{});
+test_win_title($win, "feh [1 of 3] - ${pwd}/test/ok.gif");
+feh_stop();
+unlink('test/filelist');