From f35b6c221134784b2f53f15b72b809d93f03a5ca Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 3 Oct 2010 00:38:05 +0200 Subject: Clean up test directory --- test/feh-bg.i | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) (limited to 'test/feh-bg.i') 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"); -- cgit v1.2.3