summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2010-10-03 00:38:05 +0200
committerDaniel Friesel <derf@finalrewind.org>2010-10-03 00:38:05 +0200
commitf35b6c221134784b2f53f15b72b809d93f03a5ca (patch)
treefb258df83bc2ee0bff2f81427d7dbba2c7653f64
parent95fccf0010256b0dc1cdfd9342cf877bc7feef6b (diff)
Clean up test directory
-rw-r--r--test/bg/exact/h/center (renamed from test/bg_451x500_center.png)bin6737 -> 6737 bytes
-rw-r--r--test/bg/exact/h/fill (renamed from test/bg_451x500_fill.png)bin15089 -> 15089 bytes
-rw-r--r--test/bg/exact/h/in (renamed from test/bg_451x500.png)bin9687 -> 9687 bytes
l---------test/bg/exact/h/max1
-rw-r--r--test/bg/exact/h/scale (renamed from test/bg_451x500_scale.png)bin10842 -> 10842 bytes
-rw-r--r--test/bg/exact/h/tile (renamed from test/bg_451x500_tile.png)bin6755 -> 6755 bytes
-rw-r--r--test/bg/exact/in (renamed from test/bg.png)bin9815 -> 9815 bytes
-rw-r--r--test/bg/exact/out (renamed from test/bg_all.png)bin6525 -> 6525 bytes
-rw-r--r--test/bg/exact/w/center (renamed from test/bg_500x333_center.png)bin6344 -> 6344 bytes
-rw-r--r--test/bg/exact/w/fill (renamed from test/bg_500x333_fill.png)bin18419 -> 18419 bytes
-rw-r--r--test/bg/exact/w/in (renamed from test/bg_500x333.png)bin9135 -> 9135 bytes
l---------test/bg/exact/w/max1
-rw-r--r--test/bg/exact/w/scale (renamed from test/bg_500x333_scale.png)bin11681 -> 11681 bytes
-rw-r--r--test/bg/exact/w/tile (renamed from test/bg_500x333_tile.png)bin9170 -> 9170 bytes
-rw-r--r--test/bg/large/h/center (renamed from test/bg_large_h_center.png)bin23632 -> 23632 bytes
-rw-r--r--test/bg/large/h/fill (renamed from test/bg_large_h_fill.png)bin84198 -> 84198 bytes
-rw-r--r--test/bg/large/h/in (renamed from test/bg_large_h.png)bin229116 -> 229116 bytes
-rw-r--r--test/bg/large/h/max (renamed from test/bg_large_h_max.png)bin35271 -> 35271 bytes
-rw-r--r--test/bg/large/h/scale (renamed from test/bg_large_h_scale.png)bin94912 -> 94912 bytes
-rw-r--r--test/bg/large/h/tile (renamed from test/bg_large_h_tile.png)bin13552 -> 13552 bytes
-rw-r--r--test/bg/large/w/center (renamed from test/bg_large_w_center.png)bin29104 -> 29104 bytes
-rw-r--r--test/bg/large/w/fill (renamed from test/bg_large_w_fill.png)bin125501 -> 125501 bytes
-rw-r--r--test/bg/large/w/in (renamed from test/bg_large_w.png)bin87657 -> 87657 bytes
-rw-r--r--test/bg/large/w/max (renamed from test/bg_large_w_max.png)bin17916 -> 17916 bytes
-rw-r--r--test/bg/large/w/scale (renamed from test/bg_large_w_scale.png)bin102207 -> 102207 bytes
-rw-r--r--test/bg/large/w/tile (renamed from test/bg_large_w_tile.png)bin19070 -> 19070 bytes
-rw-r--r--test/bg/small/h/center (renamed from test/bg_small_h_center.png)bin2243 -> 2243 bytes
-rw-r--r--test/bg/small/h/fill (renamed from test/bg_small_h_fill.png)bin77707 -> 77707 bytes
-rw-r--r--test/bg/small/h/in (renamed from test/bg_small_h.png)bin2453 -> 2453 bytes
-rw-r--r--test/bg/small/h/max (renamed from test/bg_small_h_max.png)bin40925 -> 40925 bytes
-rw-r--r--test/bg/small/h/scale (renamed from test/bg_small_h_scale.png)bin69223 -> 69223 bytes
-rw-r--r--test/bg/small/h/tile (renamed from test/bg_small_h_tile.png)bin9703 -> 9703 bytes
-rw-r--r--test/bg/small/w/center (renamed from test/bg_small_w_center.png)bin1919 -> 1919 bytes
-rw-r--r--test/bg/small/w/fill (renamed from test/bg_small_w_fill.png)bin68182 -> 68182 bytes
-rw-r--r--test/bg/small/w/in (renamed from test/bg_small_w.png)bin1229 -> 1229 bytes
-rw-r--r--test/bg/small/w/max (renamed from test/bg_small_w_max.png)bin35987 -> 35987 bytes
-rw-r--r--test/bg/small/w/scale (renamed from test/bg_small_w_scale.png)bin68174 -> 68174 bytes
-rw-r--r--test/bg/small/w/tile (renamed from test/bg_small_w_tile.png)bin12148 -> 12148 bytes
l---------test/bg_451x500_max.png1
l---------test/bg_500x333_max.png1
-rw-r--r--test/customlist4
-rw-r--r--test/fail/gif (renamed from test/fail.gif)0
-rw-r--r--test/fail/jpg (renamed from test/fail.jpg)0
-rw-r--r--test/fail/png (renamed from test/fail.png)0
-rw-r--r--test/fail/pnm (renamed from test/fail.pnm)0
-rwxr-xr-xtest/feh-bg.i34
-rwxr-xr-xtest/feh.i146
-rw-r--r--test/feh.t22
-rw-r--r--test/list5
-rw-r--r--test/list/custom4
-rw-r--r--test/list/default5
l---------test/list/filename1
l---------test/list/format1
-rw-r--r--test/list/format_reverse5
l---------test/list/height1
l---------test/list/name1
l---------test/list/pixels1
-rw-r--r--test/list/size5
l---------test/list/width1
l---------test/list_filename1
l---------test/list_format1
-rw-r--r--test/list_format_reverse5
l---------test/list_height1
l---------test/list_name1
l---------test/list_pixels1
-rw-r--r--test/list_size5
l---------test/list_width1
-rw-r--r--test/ok/gif (renamed from test/ok.gif)bin953 -> 953 bytes
-rw-r--r--test/ok/jpg (renamed from test/ok.jpg)bin354 -> 354 bytes
-rw-r--r--test/ok/png (renamed from test/ok.png)bin403 -> 403 bytes
-rw-r--r--test/ok/pnm (renamed from test/ok.pnm)bin269 -> 269 bytes
-rwxr-xr-xtest/run-bg3
-rwxr-xr-xtest/run-interactive3
-rw-r--r--test/warning-no-loader8
74 files changed, 133 insertions, 137 deletions
diff --git a/test/bg_451x500_center.png b/test/bg/exact/h/center
index 99555af..99555af 100644
--- a/test/bg_451x500_center.png
+++ b/test/bg/exact/h/center
Binary files differ
diff --git a/test/bg_451x500_fill.png b/test/bg/exact/h/fill
index 18e1da9..18e1da9 100644
--- a/test/bg_451x500_fill.png
+++ b/test/bg/exact/h/fill
Binary files differ
diff --git a/test/bg_451x500.png b/test/bg/exact/h/in
index 3b64670..3b64670 100644
--- a/test/bg_451x500.png
+++ b/test/bg/exact/h/in
Binary files differ
diff --git a/test/bg/exact/h/max b/test/bg/exact/h/max
new file mode 120000
index 0000000..0a90d85
--- /dev/null
+++ b/test/bg/exact/h/max
@@ -0,0 +1 @@
+center \ No newline at end of file
diff --git a/test/bg_451x500_scale.png b/test/bg/exact/h/scale
index fd884f6..fd884f6 100644
--- a/test/bg_451x500_scale.png
+++ b/test/bg/exact/h/scale
Binary files differ
diff --git a/test/bg_451x500_tile.png b/test/bg/exact/h/tile
index 1fcc1dd..1fcc1dd 100644
--- a/test/bg_451x500_tile.png
+++ b/test/bg/exact/h/tile
Binary files differ
diff --git a/test/bg.png b/test/bg/exact/in
index 0c1f09f..0c1f09f 100644
--- a/test/bg.png
+++ b/test/bg/exact/in
Binary files differ
diff --git a/test/bg_all.png b/test/bg/exact/out
index 5903c34..5903c34 100644
--- a/test/bg_all.png
+++ b/test/bg/exact/out
Binary files differ
diff --git a/test/bg_500x333_center.png b/test/bg/exact/w/center
index 7db9571..7db9571 100644
--- a/test/bg_500x333_center.png
+++ b/test/bg/exact/w/center
Binary files differ
diff --git a/test/bg_500x333_fill.png b/test/bg/exact/w/fill
index eeec8ca..eeec8ca 100644
--- a/test/bg_500x333_fill.png
+++ b/test/bg/exact/w/fill
Binary files differ
diff --git a/test/bg_500x333.png b/test/bg/exact/w/in
index 8fad57c..8fad57c 100644
--- a/test/bg_500x333.png
+++ b/test/bg/exact/w/in
Binary files differ
diff --git a/test/bg/exact/w/max b/test/bg/exact/w/max
new file mode 120000
index 0000000..0a90d85
--- /dev/null
+++ b/test/bg/exact/w/max
@@ -0,0 +1 @@
+center \ No newline at end of file
diff --git a/test/bg_500x333_scale.png b/test/bg/exact/w/scale
index fee0647..fee0647 100644
--- a/test/bg_500x333_scale.png
+++ b/test/bg/exact/w/scale
Binary files differ
diff --git a/test/bg_500x333_tile.png b/test/bg/exact/w/tile
index 5c8e1a4..5c8e1a4 100644
--- a/test/bg_500x333_tile.png
+++ b/test/bg/exact/w/tile
Binary files differ
diff --git a/test/bg_large_h_center.png b/test/bg/large/h/center
index 711704f..711704f 100644
--- a/test/bg_large_h_center.png
+++ b/test/bg/large/h/center
Binary files differ
diff --git a/test/bg_large_h_fill.png b/test/bg/large/h/fill
index 8503fc8..8503fc8 100644
--- a/test/bg_large_h_fill.png
+++ b/test/bg/large/h/fill
Binary files differ
diff --git a/test/bg_large_h.png b/test/bg/large/h/in
index 8167288..8167288 100644
--- a/test/bg_large_h.png
+++ b/test/bg/large/h/in
Binary files differ
diff --git a/test/bg_large_h_max.png b/test/bg/large/h/max
index bbad392..bbad392 100644
--- a/test/bg_large_h_max.png
+++ b/test/bg/large/h/max
Binary files differ
diff --git a/test/bg_large_h_scale.png b/test/bg/large/h/scale
index 5e88336..5e88336 100644
--- a/test/bg_large_h_scale.png
+++ b/test/bg/large/h/scale
Binary files differ
diff --git a/test/bg_large_h_tile.png b/test/bg/large/h/tile
index f16d150..f16d150 100644
--- a/test/bg_large_h_tile.png
+++ b/test/bg/large/h/tile
Binary files differ
diff --git a/test/bg_large_w_center.png b/test/bg/large/w/center
index 1f425ea..1f425ea 100644
--- a/test/bg_large_w_center.png
+++ b/test/bg/large/w/center
Binary files differ
diff --git a/test/bg_large_w_fill.png b/test/bg/large/w/fill
index 61b5448..61b5448 100644
--- a/test/bg_large_w_fill.png
+++ b/test/bg/large/w/fill
Binary files differ
diff --git a/test/bg_large_w.png b/test/bg/large/w/in
index dc1f30b..dc1f30b 100644
--- a/test/bg_large_w.png
+++ b/test/bg/large/w/in
Binary files differ
diff --git a/test/bg_large_w_max.png b/test/bg/large/w/max
index 6b3b450..6b3b450 100644
--- a/test/bg_large_w_max.png
+++ b/test/bg/large/w/max
Binary files differ
diff --git a/test/bg_large_w_scale.png b/test/bg/large/w/scale
index 20cfab3..20cfab3 100644
--- a/test/bg_large_w_scale.png
+++ b/test/bg/large/w/scale
Binary files differ
diff --git a/test/bg_large_w_tile.png b/test/bg/large/w/tile
index 16855f7..16855f7 100644
--- a/test/bg_large_w_tile.png
+++ b/test/bg/large/w/tile
Binary files differ
diff --git a/test/bg_small_h_center.png b/test/bg/small/h/center
index 3071ee6..3071ee6 100644
--- a/test/bg_small_h_center.png
+++ b/test/bg/small/h/center
Binary files differ
diff --git a/test/bg_small_h_fill.png b/test/bg/small/h/fill
index 76b2702..76b2702 100644
--- a/test/bg_small_h_fill.png
+++ b/test/bg/small/h/fill
Binary files differ
diff --git a/test/bg_small_h.png b/test/bg/small/h/in
index 74f9b29..74f9b29 100644
--- a/test/bg_small_h.png
+++ b/test/bg/small/h/in
Binary files differ
diff --git a/test/bg_small_h_max.png b/test/bg/small/h/max
index 9caa5d3..9caa5d3 100644
--- a/test/bg_small_h_max.png
+++ b/test/bg/small/h/max
Binary files differ
diff --git a/test/bg_small_h_scale.png b/test/bg/small/h/scale
index d51d64a..d51d64a 100644
--- a/test/bg_small_h_scale.png
+++ b/test/bg/small/h/scale
Binary files differ
diff --git a/test/bg_small_h_tile.png b/test/bg/small/h/tile
index 5f66296..5f66296 100644
--- a/test/bg_small_h_tile.png
+++ b/test/bg/small/h/tile
Binary files differ
diff --git a/test/bg_small_w_center.png b/test/bg/small/w/center
index d5635c3..d5635c3 100644
--- a/test/bg_small_w_center.png
+++ b/test/bg/small/w/center
Binary files differ
diff --git a/test/bg_small_w_fill.png b/test/bg/small/w/fill
index 812bb18..812bb18 100644
--- a/test/bg_small_w_fill.png
+++ b/test/bg/small/w/fill
Binary files differ
diff --git a/test/bg_small_w.png b/test/bg/small/w/in
index d281c6b..d281c6b 100644
--- a/test/bg_small_w.png
+++ b/test/bg/small/w/in
Binary files differ
diff --git a/test/bg_small_w_max.png b/test/bg/small/w/max
index d38f45e..d38f45e 100644
--- a/test/bg_small_w_max.png
+++ b/test/bg/small/w/max
Binary files differ
diff --git a/test/bg_small_w_scale.png b/test/bg/small/w/scale
index 2688754..2688754 100644
--- a/test/bg_small_w_scale.png
+++ b/test/bg/small/w/scale
Binary files differ
diff --git a/test/bg_small_w_tile.png b/test/bg/small/w/tile
index b4bf86f..b4bf86f 100644
--- a/test/bg_small_w_tile.png
+++ b/test/bg/small/w/tile
Binary files differ
diff --git a/test/bg_451x500_max.png b/test/bg_451x500_max.png
deleted file mode 120000
index 4721827..0000000
--- a/test/bg_451x500_max.png
+++ /dev/null
@@ -1 +0,0 @@
-bg_451x500_center.png \ No newline at end of file
diff --git a/test/bg_500x333_max.png b/test/bg_500x333_max.png
deleted file mode 120000
index 13547b7..0000000
--- a/test/bg_500x333_max.png
+++ /dev/null
@@ -1 +0,0 @@
-bg_500x333_center.png \ No newline at end of file
diff --git a/test/customlist b/test/customlist
deleted file mode 100644
index 3595be4..0000000
--- a/test/customlist
+++ /dev/null
@@ -1,4 +0,0 @@
-test/ok.gif; 16; 4; list; ok.gif; 256; 953; gif; 0; 16
-test/ok.jpg; 16; 4; list; ok.jpg; 256; 354; jpeg; 0; 16
-test/ok.png; 16; 4; list; ok.png; 256; 403; png; 0; 16
-test/ok.pnm; 16; 4; list; ok.pnm; 256; 269; pnm; 0; 16
diff --git a/test/fail.gif b/test/fail/gif
index e69de29..e69de29 100644
--- a/test/fail.gif
+++ b/test/fail/gif
diff --git a/test/fail.jpg b/test/fail/jpg
index e69de29..e69de29 100644
--- a/test/fail.jpg
+++ b/test/fail/jpg
diff --git a/test/fail.png b/test/fail/png
index e69de29..e69de29 100644
--- a/test/fail.png
+++ b/test/fail/png
diff --git a/test/fail.pnm b/test/fail/pnm
index e69de29..e69de29 100644
--- a/test/fail.pnm
+++ b/test/fail/pnm
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");
diff --git a/test/feh.i b/test/feh.i
index 94ab138..b45952e 100755
--- a/test/feh.i
+++ b/test/feh.i
@@ -30,7 +30,7 @@ sub feh_start {
my $id;
$opts //= q{};
- $files //= 'test/ok.png';
+ $files //= 'test/ok/png';
StartApp("feh ${opts} ${files}");
($id) = WaitWindowViewable(qr{^feh});
@@ -100,190 +100,190 @@ for my $key (qw/q x {ESC}/) {
test_no_win("$key pressed");
}
-$win = feh_start(q{}, 'test/ok.png');
-test_win_title($win, 'feh [1 of 1] - test/ok.png');
+$win = feh_start(q{}, 'test/ok/png');
+test_win_title($win, 'feh [1 of 1] - test/ok/png');
feh_stop();
-$win = feh_start(q{}, 'test/ok.png test/ok.jpg test/ok.gif');
-test_win_title($win, 'feh [1 of 3] - test/ok.png');
+$win = feh_start(q{}, 'test/ok/png test/ok/jpg test/ok/gif');
+test_win_title($win, 'feh [1 of 3] - test/ok/png');
SendKeys('{RIG}');
-test_win_title($win, 'feh [2 of 3] - test/ok.jpg');
+test_win_title($win, 'feh [2 of 3] - test/ok/jpg');
SendKeys('n');
-test_win_title($win, 'feh [3 of 3] - test/ok.gif');
+test_win_title($win, 'feh [3 of 3] - test/ok/gif');
SendKeys('{SPA}');
-test_win_title($win, 'feh [1 of 3] - test/ok.png');
+test_win_title($win, 'feh [1 of 3] - test/ok/png');
SendKeys('{LEF}');
-test_win_title($win, 'feh [3 of 3] - test/ok.gif');
+test_win_title($win, 'feh [3 of 3] - test/ok/gif');
SendKeys('p');
-test_win_title($win, 'feh [2 of 3] - test/ok.jpg');
+test_win_title($win, 'feh [2 of 3] - test/ok/jpg');
SendKeys('{BAC}');
-test_win_title($win, 'feh [1 of 3] - test/ok.png');
+test_win_title($win, 'feh [1 of 3] - test/ok/png');
SendKeys('p');
-test_win_title($win, 'feh [3 of 3] - test/ok.gif');
+test_win_title($win, 'feh [3 of 3] - test/ok/gif');
SendKeys('{DEL}');
-test_win_title($win, 'feh [1 of 2] - test/ok.png');
+test_win_title($win, 'feh [1 of 2] - test/ok/png');
SendKeys('{DEL}');
-test_win_title($win, 'feh [1 of 1] - test/ok.jpg');
+test_win_title($win, 'feh [1 of 1] - test/ok/jpg');
SendKeys('{DEL}');
test_no_win("Removed all images from slideshow");
$win = feh_start('--title \'feh %m %u/%l %n\'',
- 'test/ok.png test/ok.jpg test/ok.gif');
-test_win_title($win, 'feh slideshow 1/3 ok.png');
+ 'test/ok/png test/ok/jpg test/ok/gif');
+test_win_title($win, 'feh slideshow 1/3 png');
SendKeys('{RIG}');
-test_win_title($win, 'feh slideshow 2/3 ok.jpg');
+test_win_title($win, 'feh slideshow 2/3 jpg');
feh_stop();
-feh_start('--cycle-once', 'test/ok.png test/ok.jpg');
+feh_start('--cycle-once', 'test/ok/png test/ok/jpg');
for (1 .. 2) {
SendKeys('{RIG}');
}
test_no_win("--cycle-once -> window closed");
feh_start('--cycle-once --slideshow-delay 0.5',
- 'test/ok.png test/ok.jpg test/ok.gif');
+ 'test/ok/png test/ok/jpg test/ok/gif');
sleep(1.5);
test_no_win('cycle-once + slideshow-delay -> window closed');
$win = feh_start('--cycle-once --slideshow-delay -0.01',
- 'test/ok.png test/ok.jpg test/ok.gif');
+ 'test/ok/png test/ok/jpg test/ok/gif');
-test_win_title($win, 'feh [1 of 3] - test/ok.png [Paused]');
+test_win_title($win, 'feh [1 of 3] - test/ok/png [Paused]');
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');
+$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');
+ 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');
+ test_win_title($win, 'feh [1 of 4] - test/ok/png');
}
SendKeys('{PGU}');
-test_win_title($win, 'feh [4 of 4] - test/ok.jpg');
+test_win_title($win, 'feh [4 of 4] - test/ok/jpg');
SendKeys('{PGD}');
-test_win_title($win, 'feh [1 of 4] - test/ok.png');
+test_win_title($win, 'feh [1 of 4] - test/ok/png');
SendKeys('{PGD}');
-test_win_title($win, 'feh [2 of 4] - test/ok.gif');
+test_win_title($win, 'feh [2 of 4] - test/ok/gif');
feh_stop();
-$win = feh_start('--slideshow-delay 1', 'test/ok.png test/ok.gif test/ok.jpg');
+$win = feh_start('--slideshow-delay 1', 'test/ok/png test/ok/gif test/ok/jpg');
sleep(1.7);
-test_win_title($win, 'feh [3 of 3] - test/ok.jpg');
+test_win_title($win, 'feh [3 of 3] - test/ok/jpg');
SendKeys('h');
-test_win_title($win, 'feh [3 of 3] - test/ok.jpg [Paused]');
+test_win_title($win, 'feh [3 of 3] - test/ok/jpg [Paused]');
SendKeys('{RIG}');
-test_win_title($win, 'feh [1 of 3] - test/ok.png [Paused]');
+test_win_title($win, 'feh [1 of 3] - test/ok/png [Paused]');
SendKeys('h');
-test_win_title($win, 'feh [1 of 3] - test/ok.png');
+test_win_title($win, 'feh [1 of 3] - test/ok/png');
sleep(0.8);
-test_win_title($win, 'feh [2 of 3] - test/ok.gif');
+test_win_title($win, 'feh [2 of 3] - 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');
+$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');
+test_win_title($win, 'feh [6 of 100] - test/ok/png');
SendKeys('{PGD}');
-test_win_title($win, 'feh [11 of 100] - test/ok.png');
+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');
+test_win_title($win, 'feh [96 of 100] - test/ok/png');
feh_stop();
$win = feh_start('--thumbnails -H 300 -W 310 --thumb-title "%P [%l] %f"',
- 'test/ok.png test/ok.gif test/ok.jpg');
+ 'test/ok/png test/ok/gif test/ok/jpg');
test_win_title($win, 'feh [thumbnail mode]');
($width, $height) = (GetWindowPos($win))[2,3];
is($width, 310, 'thumbnail win: Set correct width');
is($height, 300, 'thumbnail win: Set correct height');
MoveMouseAbs(30, 30);
ClickMouseButton(M_BTN1);
-($win) = WaitWindowViewable(qr{test/ok\.png$});
+($win) = WaitWindowViewable(qr{test/ok/png$});
ok($win, 'Thumbnail mode: Window opened');
-test_win_title($win, 'feh [3] test/ok.png');
+test_win_title($win, 'feh [3] test/ok/png');
SetInputFocus($win);
SendKeys('x');
-ok(waitfor { not FindWindowLike(qr{^ok\.png$}) }, 'Thumbnail mode: closed');
+ok(waitfor { not FindWindowLike(qr{^ok/png$}) }, 'Thumbnail mode: closed');
MoveMouseAbs(90, 30);
ClickMouseButton(M_BTN1);
-($win) = WaitWindowViewable(qr{test/ok\.gif$});
+($win) = WaitWindowViewable(qr{test/ok/gif$});
ok($win, 'Thumbnail mode: Window opened');
-test_win_title($win, 'feh [3] test/ok.gif');
+test_win_title($win, 'feh [3] test/ok/gif');
MoveMouseAbs(150,30);
ClickMouseButton(M_BTN1);
-($win) = WaitWindowViewable(qr{test/ok\.jpg$});
+($win) = WaitWindowViewable(qr{test/ok/jpg$});
ok($win, 'Thumbnail mode: Other window opened');
-test_win_title($win, 'feh [3] test/ok.jpg');
+test_win_title($win, 'feh [3] test/ok/jpg');
feh_stop();
-feh_start('--multiwindow', 'test/ok.png test/ok.gif test/ok.jpg');
-ok(waitfor { FindWindowLike(qr{^feh - test/ok\.png$}) }, 'multiwindow 1/3');
-ok(waitfor { FindWindowLike(qr{^feh - test/ok\.gif$}) }, 'multiwindow 2/3');
-ok(waitfor { FindWindowLike(qr{^feh - test/ok\.jpg$}) }, 'multiwindow 3/3');
+feh_start('--multiwindow', 'test/ok/png test/ok/gif test/ok/jpg');
+ok(waitfor { FindWindowLike(qr{^feh - test/ok/png$}) }, 'multiwindow 1/3');
+ok(waitfor { FindWindowLike(qr{^feh - test/ok/gif$}) }, 'multiwindow 2/3');
+ok(waitfor { FindWindowLike(qr{^feh - test/ok/jpg$}) }, 'multiwindow 3/3');
-($win) = FindWindowLike(qr{^feh - test/ok\.gif$});
+($win) = FindWindowLike(qr{^feh - test/ok/gif$});
SetInputFocus($win);
SendKeys('x');
-ok(waitfor { not FindWindowLike(qr{^feh - test/ok\.gif$}) }, 'win 1 closed');
-ok(FindWindowLike(qr{^feh - test/ok\.png$}), 'multiwindow 1/2');
-ok(FindWindowLike(qr{^feh - test/ok\.jpg$}), 'multiwindow 2/2');
+ok(waitfor { not FindWindowLike(qr{^feh - test/ok/gif$}) }, 'win 1 closed');
+ok(FindWindowLike(qr{^feh - test/ok/png$}), 'multiwindow 1/2');
+ok(FindWindowLike(qr{^feh - test/ok/jpg$}), 'multiwindow 2/2');
-($win) = FindWindowLike(qr{^feh - test/ok\.jpg$});
+($win) = FindWindowLike(qr{^feh - test/ok/jpg$});
SetInputFocus($win);
SendKeys('x');
-ok(waitfor { not FindWindowLike(qr{^feh - test/ok\.jpg$}) }, 'win 2 closed');
+ok(waitfor { not FindWindowLike(qr{^feh - test/ok/jpg$}) }, 'win 2 closed');
-($win) = FindWindowLike(qr{^feh - test/ok\.png$});
+($win) = FindWindowLike(qr{^feh - test/ok/png$});
SetInputFocus($win);
SendKeys('x');
test_no_win('all multiwindows closed');
-$win = feh_start('--start-at test/ok.jpg', 'test/ok.png test/ok.gif test/ok.jpg');
-test_win_title($win, 'feh [3 of 3] - test/ok.jpg');
+$win = feh_start('--start-at test/ok/jpg', 'test/ok/png test/ok/gif test/ok/jpg');
+test_win_title($win, 'feh [3 of 3] - test/ok/jpg');
SendKeys('{RIG}');
-test_win_title($win, 'feh [1 of 3] - test/ok.png');
+test_win_title($win, 'feh [1 of 3] - test/ok/png');
feh_stop();
-feh_start('--caption-path .captions', 'test/ok.png');
+feh_start('--caption-path .captions', 'test/ok/png');
SendKeys('cFoo Bar Quux Moep~');
feh_stop();
-ok(-d 'test/.captions', 'autocreated captions directory');
-is(slurp('test/.captions/ok.png.txt'), 'Foo Bar Quux Moep',
+ok(-d 'test/ok/.captions', 'autocreated captions directory');
+is(slurp('test/ok/.captions/png.txt'), 'Foo Bar Quux Moep',
'Correct caption saved');
-feh_start('--caption-path .captions', 'test/ok.png');
+feh_start('--caption-path .captions', 'test/ok/png');
SendKeys('c');
SendKeys('{BKS}' x length('Foo Bar Quux Moep'));
SendKeys('Foo Bar^(~)miep~');
feh_stop();
-is(slurp('test/.captions/ok.png.txt'), "Foo Bar\nmiep",
+is(slurp('test/ok/.captions/png.txt'), "Foo Bar\nmiep",
'Caption with newline + correct backspace');
-unlink('test/.captions/ok.png.txt');
-rmdir('test/.captions');
+unlink('test/ok/.captions/png.txt');
+rmdir('test/ok/.captions');
$win = feh_start('--filelist test/filelist',
- 'test/ok.png test/ok.gif test/ok.png test/ok.jpg');
+ '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");
+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
+${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");
+test_win_title($win, "feh [1 of 3] - ${pwd}/test/ok/gif");
feh_stop();
unlink('test/filelist');
diff --git a/test/feh.t b/test/feh.t
index 67fb269..e142e63 100644
--- a/test/feh.t
+++ b/test/feh.t
@@ -6,7 +6,7 @@ use Test::Command tests => 48;
my $fehrc = "/tmp/.fehrc-$$";
my $feh = "src/feh --rcfile $fehrc";
-my $images = 'test/ok.* test/fail.*';
+my $images = 'test/ok/* test/fail/*';
my ($feh_name, $feh_version) = @ENV{'PACKAGE', 'VERSION'};
@@ -37,10 +37,10 @@ if (length($feh_name) == 0 or length($feh_version) == 0) {
}
my $re_warning =
- qr{${feh_name} WARNING: test/fail\.... \- No Imlib2 loader for that file format\n};
-my $re_loadable = qr{test/ok\....};
-my $re_unloadable = qr{test/fail\....};
-my $re_list_action = qr{test/ok\.... 16x16 \(${feh_name}\)};
+ qr{${feh_name} WARNING: test/fail/... \- No Imlib2 loader for that file format\n};
+my $re_loadable = qr{test/ok/...};
+my $re_unloadable = qr{test/fail/...};
+my $re_list_action = qr{test/ok/... 16x16 \(${feh_name}\)};
my $cmd = Test::Command->new(cmd => $feh);
@@ -73,40 +73,40 @@ $cmd->stderr_is_eq('');
$cmd = Test::Command->new(cmd => "$feh --list $images");
$cmd->exit_is_num(0);
-$cmd->stdout_is_file('test/list');
+$cmd->stdout_is_file('test/list/default');
$cmd->stderr_like($re_warning);
for my $sort (qw/name filename width height pixels size format/) {
$cmd = Test::Command->new(cmd => "$feh --list $images --sort $sort");
$cmd->exit_is_num(0);
- $cmd->stdout_is_file("test/list_$sort");
+ $cmd->stdout_is_file("test/list/$sort");
$cmd->stderr_like($re_warning);
}
$cmd = Test::Command->new(cmd => "$feh --list $images --sort format --reverse");
$cmd->exit_is_num(0);
-$cmd->stdout_is_file('test/list_format_reverse');
+$cmd->stdout_is_file('test/list/format_reverse');
$cmd->stderr_like($re_warning);
$cmd = Test::Command->new(cmd => "$feh --customlist '%f; %h; %l; %m; %n; %p; "
. "%s; %t; %u; %w' $images");
$cmd->exit_is_num(0);
-$cmd->stdout_is_file('test/customlist');
+$cmd->stdout_is_file('test/list/custom');
$cmd->stderr_like($re_warning);
$cmd = Test::Command->new(cmd => "$feh --list --quiet $images");
$cmd->exit_is_num(0);
-$cmd->stdout_is_file('test/list');
+$cmd->stdout_is_file('test/list/default');
$cmd->stderr_is_eq('');
$cmd = Test::Command->new(cmd =>
"$feh --quiet --list --action 'echo \"%f %wx%h (%P)\" >&2' $images");
$cmd->exit_is_num(0);
-$cmd->stdout_is_file('test/list');
+$cmd->stdout_is_file('test/list/default');
$cmd->stderr_like($re_list_action);
unlink($fehrc);
diff --git a/test/list b/test/list
deleted file mode 100644
index 036b0f4..0000000
--- a/test/list
+++ /dev/null
@@ -1,5 +0,0 @@
-NUM FORMAT WIDTH HEIGHT PIXELS SIZE(bytes) ALPHA FILENAME
-1 gif 16 16 256 953 - test/ok.gif
-2 jpeg 16 16 256 354 - test/ok.jpg
-3 png 16 16 256 403 X test/ok.png
-4 pnm 16 16 256 269 - test/ok.pnm
diff --git a/test/list/custom b/test/list/custom
new file mode 100644
index 0000000..b5ddb32
--- /dev/null
+++ b/test/list/custom
@@ -0,0 +1,4 @@
+test/ok/gif; 16; 4; list; gif; 256; 953; gif; 0; 16
+test/ok/jpg; 16; 4; list; jpg; 256; 354; jpeg; 0; 16
+test/ok/png; 16; 4; list; png; 256; 403; png; 0; 16
+test/ok/pnm; 16; 4; list; pnm; 256; 269; pnm; 0; 16
diff --git a/test/list/default b/test/list/default
new file mode 100644
index 0000000..d7b2c12
--- /dev/null
+++ b/test/list/default
@@ -0,0 +1,5 @@
+NUM FORMAT WIDTH HEIGHT PIXELS SIZE(bytes) ALPHA FILENAME
+1 gif 16 16 256 953 - test/ok/gif
+2 jpeg 16 16 256 354 - test/ok/jpg
+3 png 16 16 256 403 X test/ok/png
+4 pnm 16 16 256 269 - test/ok/pnm
diff --git a/test/list/filename b/test/list/filename
new file mode 120000
index 0000000..331d858
--- /dev/null
+++ b/test/list/filename
@@ -0,0 +1 @@
+default \ No newline at end of file
diff --git a/test/list/format b/test/list/format
new file mode 120000
index 0000000..331d858
--- /dev/null
+++ b/test/list/format
@@ -0,0 +1 @@
+default \ No newline at end of file
diff --git a/test/list/format_reverse b/test/list/format_reverse
new file mode 100644
index 0000000..801b732
--- /dev/null
+++ b/test/list/format_reverse
@@ -0,0 +1,5 @@
+NUM FORMAT WIDTH HEIGHT PIXELS SIZE(bytes) ALPHA FILENAME
+1 pnm 16 16 256 269 - test/ok/pnm
+2 png 16 16 256 403 X test/ok/png
+3 jpeg 16 16 256 354 - test/ok/jpg
+4 gif 16 16 256 953 - test/ok/gif
diff --git a/test/list/height b/test/list/height
new file mode 120000
index 0000000..331d858
--- /dev/null
+++ b/test/list/height
@@ -0,0 +1 @@
+default \ No newline at end of file
diff --git a/test/list/name b/test/list/name
new file mode 120000
index 0000000..331d858
--- /dev/null
+++ b/test/list/name
@@ -0,0 +1 @@
+default \ No newline at end of file
diff --git a/test/list/pixels b/test/list/pixels
new file mode 120000
index 0000000..331d858
--- /dev/null
+++ b/test/list/pixels
@@ -0,0 +1 @@
+default \ No newline at end of file
diff --git a/test/list/size b/test/list/size
new file mode 100644
index 0000000..9e1c3d0
--- /dev/null
+++ b/test/list/size
@@ -0,0 +1,5 @@
+NUM FORMAT WIDTH HEIGHT PIXELS SIZE(bytes) ALPHA FILENAME
+1 pnm 16 16 256 269 - test/ok/pnm
+2 jpeg 16 16 256 354 - test/ok/jpg
+3 png 16 16 256 403 X test/ok/png
+4 gif 16 16 256 953 - test/ok/gif
diff --git a/test/list/width b/test/list/width
new file mode 120000
index 0000000..331d858
--- /dev/null
+++ b/test/list/width
@@ -0,0 +1 @@
+default \ No newline at end of file
diff --git a/test/list_filename b/test/list_filename
deleted file mode 120000
index e48b39a..0000000
--- a/test/list_filename
+++ /dev/null
@@ -1 +0,0 @@
-list \ No newline at end of file
diff --git a/test/list_format b/test/list_format
deleted file mode 120000
index e48b39a..0000000
--- a/test/list_format
+++ /dev/null
@@ -1 +0,0 @@
-list \ No newline at end of file
diff --git a/test/list_format_reverse b/test/list_format_reverse
deleted file mode 100644
index 71d1067..0000000
--- a/test/list_format_reverse
+++ /dev/null
@@ -1,5 +0,0 @@
-NUM FORMAT WIDTH HEIGHT PIXELS SIZE(bytes) ALPHA FILENAME
-1 pnm 16 16 256 269 - test/ok.pnm
-2 png 16 16 256 403 X test/ok.png
-3 jpeg 16 16 256 354 - test/ok.jpg
-4 gif 16 16 256 953 - test/ok.gif
diff --git a/test/list_height b/test/list_height
deleted file mode 120000
index e48b39a..0000000
--- a/test/list_height
+++ /dev/null
@@ -1 +0,0 @@
-list \ No newline at end of file
diff --git a/test/list_name b/test/list_name
deleted file mode 120000
index e48b39a..0000000
--- a/test/list_name
+++ /dev/null
@@ -1 +0,0 @@
-list \ No newline at end of file
diff --git a/test/list_pixels b/test/list_pixels
deleted file mode 120000
index e48b39a..0000000
--- a/test/list_pixels
+++ /dev/null
@@ -1 +0,0 @@
-list \ No newline at end of file
diff --git a/test/list_size b/test/list_size
deleted file mode 100644
index 62fa3ba..0000000
--- a/test/list_size
+++ /dev/null
@@ -1,5 +0,0 @@
-NUM FORMAT WIDTH HEIGHT PIXELS SIZE(bytes) ALPHA FILENAME
-1 pnm 16 16 256 269 - test/ok.pnm
-2 jpeg 16 16 256 354 - test/ok.jpg
-3 png 16 16 256 403 X test/ok.png
-4 gif 16 16 256 953 - test/ok.gif
diff --git a/test/list_width b/test/list_width
deleted file mode 120000
index e48b39a..0000000
--- a/test/list_width
+++ /dev/null
@@ -1 +0,0 @@
-list \ No newline at end of file
diff --git a/test/ok.gif b/test/ok/gif
index 613264e..613264e 100644
--- a/test/ok.gif
+++ b/test/ok/gif
Binary files differ
diff --git a/test/ok.jpg b/test/ok/jpg
index 060565e..060565e 100644
--- a/test/ok.jpg
+++ b/test/ok/jpg
Binary files differ
diff --git a/test/ok.png b/test/ok/png
index 2f06506..2f06506 100644
--- a/test/ok.png
+++ b/test/ok/png
Binary files differ
diff --git a/test/ok.pnm b/test/ok/pnm
index d62d062..d62d062 100644
--- a/test/ok.pnm
+++ b/test/ok/pnm
Binary files differ
diff --git a/test/run-bg b/test/run-bg
index df5d6ac..ee4dee5 100755
--- a/test/run-bg
+++ b/test/run-bg
@@ -7,5 +7,8 @@ pid=${!}
DISPLAY=:7 twm > /dev/null 2>&1 &
DISPLAY=:7 prove -v test/feh-bg.i
+ret=${?}
kill ${pid}
+
+exit ${ret}
diff --git a/test/run-interactive b/test/run-interactive
index d6f3fc4..01dc773 100755
--- a/test/run-interactive
+++ b/test/run-interactive
@@ -4,5 +4,8 @@ Xnest -geometry 500x500 :7 > /dev/null 2>&1 &
pid=${!}
DISPLAY=:7 prove -v test/feh.i
+ret=${?}
kill ${pid}
+
+exit ${ret}
diff --git a/test/warning-no-loader b/test/warning-no-loader
index 0ab95a5..9a1ff9e 100644
--- a/test/warning-no-loader
+++ b/test/warning-no-loader
@@ -1,4 +1,4 @@
-feh WARNING: test/fail.pnm - No Imlib2 loader for that file format
-feh WARNING: test/fail.png - No Imlib2 loader for that file format
-feh WARNING: test/fail.jpg - No Imlib2 loader for that file format
-feh WARNING: test/fail.gif - No Imlib2 loader for that file format
+feh WARNING: test/fail/pnm - No Imlib2 loader for that file format
+feh WARNING: test/fail/png - No Imlib2 loader for that file format
+feh WARNING: test/fail/jpg - No Imlib2 loader for that file format
+feh WARNING: test/fail/gif - No Imlib2 loader for that file format