diff --git a/test/feh.t b/test/feh.t index b08238b72509e467c9eacb78ca70de7ae9e65128..c8683825bee1b37e3e67105b304b1a2290f82878 100644 --- a/test/feh.t +++ b/test/feh.t @@ -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); diff --git a/test/nx_action/loadable_action b/test/nx_action/loadable_action new file mode 100644 index 0000000000000000000000000000000000000000..d173261ee9251ae67fc5a9b5d93bce867bcb6570 --- /dev/null +++ b/test/nx_action/loadable_action @@ -0,0 +1,8 @@ +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 diff --git a/test/nx_action/loadable_naction b/test/nx_action/loadable_naction new file mode 100644 index 0000000000000000000000000000000000000000..d173261ee9251ae67fc5a9b5d93bce867bcb6570 --- /dev/null +++ b/test/nx_action/loadable_naction @@ -0,0 +1,8 @@ +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 diff --git a/test/nx_action/unloadable_action b/test/nx_action/unloadable_action new file mode 100644 index 0000000000000000000000000000000000000000..c16572ee94a6b7a8948a4303a14161770760bb84 --- /dev/null +++ b/test/nx_action/unloadable_action @@ -0,0 +1,8 @@ +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 diff --git a/test/nx_action/unloadable_naction b/test/nx_action/unloadable_naction new file mode 100644 index 0000000000000000000000000000000000000000..c16572ee94a6b7a8948a4303a14161770760bb84 --- /dev/null +++ b/test/nx_action/unloadable_naction @@ -0,0 +1,8 @@ +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 diff --git a/test/status b/test/status index aa6667259be957e623a04871dfaa92d1c9e17b81..9d57aaf4a5715506d407d224df437a486fe6b113 100644 --- a/test/status +++ b/test/status @@ -19,8 +19,8 @@ Overall test status, what's covered / missing [x] hold-action flag [x] supports format specifiers [x] with --list - [ ] with --loadable - [ ] with --unloadable + [x] with --loadable + [x] with --unloadable --alpha --auto-zoom