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.i | 146 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 73 insertions(+), 73 deletions(-) (limited to 'test/feh.i') 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'); -- cgit v1.2.3