summaryrefslogtreecommitdiff
path: root/test/feh.t
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-02-03 20:36:39 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-02-03 20:36:39 +0100
commitc9077797656d710d24b84d9a8523c4ffc8515b38 (patch)
treeaaeff65191d4723ad1401e4e96248e1c8b49f9fc /test/feh.t
parent4af2eacca3001605274e2986fbbad3695efe715a (diff)
Add tests for --action & --(un)loadable combo
Diffstat (limited to 'test/feh.t')
-rw-r--r--test/feh.t34
1 files changed, 33 insertions, 1 deletions
diff --git a/test/feh.t b/test/feh.t
index b08238b..c868382 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);