Commit c9077797 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Add tests for --action & --(un)loadable combo

parent 4af2eacc
Loading
Loading
Loading
Loading
+33 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
use strict;
use warnings;
use 5.010;
use Test::Command tests => 48;
use Test::Command tests => 60;

$ENV{HOME} = 'test';

@@ -61,6 +61,38 @@ $cmd->exit_is_num(0);
$cmd->stdout_like($re_loadable);
$cmd->stderr_is_eq('');

$cmd = Test::Command->new(
	cmd => "$feh --loadable --action 'echo touch %f' $images"
);

$cmd->exit_is_num(0);
$cmd->stdout_is_file('test/nx_action/loadable_action');
$cmd->stderr_is_eq('');

$cmd = Test::Command->new(
	cmd => "$feh --loadable --action ';echo touch %f' $images"
);

$cmd->exit_is_num(0);
$cmd->stdout_is_file('test/nx_action/loadable_naction');
$cmd->stderr_is_eq('');

$cmd = Test::Command->new(
	cmd => "$feh --unloadable --action 'echo rm %f' $images"
);

$cmd->exit_is_num(0);
$cmd->stdout_is_file('test/nx_action/unloadable_action');
$cmd->stderr_is_eq('');

$cmd = Test::Command->new(
	cmd => "$feh --unloadable --action ';echo rm %f' $images"
);

$cmd->exit_is_num(0);
$cmd->stdout_is_file('test/nx_action/unloadable_naction');
$cmd->stderr_is_eq('');

$cmd = Test::Command->new(cmd => "$feh --unloadable $images");

$cmd->exit_is_num(0);
+8 −0
Original line number Diff line number Diff line
touch test/ok/gif
touch test/ok/jpg
touch test/ok/png
touch test/ok/pnm
test/ok/gif
test/ok/jpg
test/ok/png
test/ok/pnm
+8 −0
Original line number Diff line number Diff line
touch test/ok/gif
touch test/ok/jpg
touch test/ok/png
touch test/ok/pnm
test/ok/gif
test/ok/jpg
test/ok/png
test/ok/pnm
+8 −0
Original line number Diff line number Diff line
rm test/fail/gif
rm test/fail/jpg
rm test/fail/png
rm test/fail/pnm
test/fail/gif
test/fail/jpg
test/fail/png
test/fail/pnm
+8 −0
Original line number Diff line number Diff line
rm test/fail/gif
rm test/fail/jpg
rm test/fail/png
rm test/fail/pnm
test/fail/gif
test/fail/jpg
test/fail/png
test/fail/pnm
Loading