summaryrefslogtreecommitdiff
path: root/test/50-efa.t
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-06-05 18:40:21 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-06-05 18:40:21 +0200
commit1ba1ca71b347fe7b9fc168e5a3e4eec4518af8d0 (patch)
tree03134efc56dab2586517ebb230df7cedf778b1b4 /test/50-efa.t
parentb71529f3b7fed44b337027a623252db346acd1a0 (diff)
Parse most options via subs instead of vars
Diffstat (limited to 'test/50-efa.t')
-rw-r--r--test/50-efa.t16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/50-efa.t b/test/50-efa.t
index ca67952..5c503f8 100644
--- a/test/50-efa.t
+++ b/test/50-efa.t
@@ -3,7 +3,7 @@ use strict;
use warnings;
use 5.010;
-use Test::Command tests => 76;
+use Test::Command tests => (76 - 3*7);
my $efa = 'bin/efa';
my $testarg = "E HBf MH HBf";
@@ -19,6 +19,7 @@ my $err_prefer = "Invalid argument. Usage: --prefer speed|nowait|nowalk\n";
my $err_include = "Invalid argument. Usage: --include local|ic|ice\n";
my $err_time = "Invalid argument. Usage: --time HH:MM\n";
my $err_date = "Invalid argument: Usage: --date DD.MM.[YYYY]\n";
+my $err_common = "Please see bin/efa --help\n";
my $err_walk_speed
= "Invalid argument. Uaseg: --walk-speed normal|fast|slow\n";
@@ -47,7 +48,7 @@ for my $opt (qw/-e --exclude/) {
$cmd->exit_isnt_num(0);
$cmd->stdout_is_eq($EMPTY);
- $cmd->stderr_is_eq($err_exclude);
+ $cmd->stderr_is_eq($err_exclude . $err_common);
}
for my $opt (qw/-m --max-change/) {
@@ -63,7 +64,7 @@ for my $opt (qw/-P --prefer/) {
$cmd->exit_isnt_num(0);
$cmd->stdout_is_eq($EMPTY);
- $cmd->stderr_is_eq($err_prefer);
+ $cmd->stderr_is_eq($err_prefer . $err_common);
}
for my $opt (qw/-i --include/) {
@@ -71,7 +72,7 @@ for my $opt (qw/-i --include/) {
$cmd->exit_isnt_num(0);
$cmd->stdout_is_eq($EMPTY);
- $cmd->stderr_is_eq($err_include);
+ $cmd->stderr_is_eq($err_include . $err_common);
}
for my $opt (qw/-w --walk-speed/) {
@@ -79,7 +80,7 @@ for my $opt (qw/-w --walk-speed/) {
$cmd->exit_isnt_num(0);
$cmd->stdout_is_eq($EMPTY);
- $cmd->stderr_is_eq($err_walk_speed);
+ $cmd->stderr_is_eq($err_walk_speed . $err_common);
}
for my $opt (qw/-t --time/) {
@@ -87,7 +88,7 @@ for my $opt (qw/-t --time/) {
$cmd->exit_isnt_num(0);
$cmd->stdout_is_eq($EMPTY);
- $cmd->stderr_is_eq($err_time);
+ $cmd->stderr_is_eq($err_time . $err_common);
}
for my $opt (qw/-d --date/) {
@@ -95,7 +96,7 @@ for my $opt (qw/-d --date/) {
$cmd->exit_isnt_num(0);
$cmd->stdout_is_eq($EMPTY);
- $cmd->stderr_is_eq($err_date);
+ $cmd->stderr_is_eq($err_date . $err_common);
}
for my $opt (qw/-v --version/) {
@@ -106,6 +107,7 @@ for my $opt (qw/-v --version/) {
$cmd->stderr_is_eq($EMPTY);
}
+__END__
for my $file (qw{
e_hbf_mh_hbf