summaryrefslogtreecommitdiff
path: root/test/feh-bg.i
diff options
context:
space:
mode:
Diffstat (limited to 'test/feh-bg.i')
-rwxr-xr-xtest/feh-bg.i34
1 files changed, 12 insertions, 22 deletions
diff --git a/test/feh-bg.i b/test/feh-bg.i
index 63aecda..1cfb43f 100755
--- a/test/feh-bg.i
+++ b/test/feh-bg.i
@@ -10,11 +10,9 @@ use Time::HiRes qw/sleep/;
sub set_bg {
my ($mode, $file) = @_;
- $file //= 'bg.png';
-
ok(
- system("feh --bg-${mode} test/${file}") == 0,
- "Ran feh --bg-${mode} test/${file}"
+ system("feh --bg-${mode} test/bg/${file}") == 0,
+ "Ran feh --bg-${mode} test/bg/${file}"
);
}
@@ -33,32 +31,24 @@ sub check_bg {
system("import -silent -window root /tmp/feh_${$}.png");
ok(
- same_files("test/${file}", "/tmp/feh_${$}.png"),
- "Wallpaper is test/${file}"
+ same_files("test/bg/${file}", "/tmp/feh_${$}.png"),
+ "Wallpaper is test/bg/${file}"
);
}
for my $mode (qw( center fill max scale tile )) {
- set_bg($mode);
- check_bg('bg_all.png');
-
- set_bg($mode, 'bg_500x333.png');
- check_bg("bg_500x333_${mode}.png");
-
- set_bg($mode, 'bg_451x500.png');
- check_bg("bg_451x500_${mode}.png");
- set_bg($mode, 'bg_small_w.png');
- check_bg("bg_small_w_${mode}.png");
+ set_bg($mode, 'exact/in');
+ check_bg('exact/out');
- set_bg($mode, 'bg_small_h.png');
- check_bg("bg_small_h_${mode}.png");
+ for my $type (qw( exact small large )) {
+ for my $orientation (qw( w h )) {
- set_bg($mode, 'bg_large_w.png');
- check_bg("bg_large_w_${mode}.png");
+ set_bg($mode, "${type}/${orientation}/in");
+ check_bg("${type}/${orientation}/${mode}");
- set_bg($mode, 'bg_large_h.png');
- check_bg("bg_large_h_${mode}.png");
+ }
+ }
}
unlink("/tmp/feh_${$}.png");