diff --git a/bin/efa b/bin/efa index a1a0f1f25fff5000746e9057c8fb5162e3398609..f15da8adc260caf530319369a3e9b4088e7a2787 100755 --- a/bin/efa +++ b/bin/efa @@ -220,7 +220,7 @@ GetOptions( 't|time=s' => \$time, 'to=s{2}' => \@to, 'to-type=s' => \$to_type, - 'version' => sub {print "efa version $version\n"; exit 0}, + 'v|version' => sub {print "efa version $version\n"; exit 0}, 'via=s{2}' => \@via, 'via-type=s' => \$via_type, 'w|walk-speed=s' => \$walk_speed, diff --git a/test/50-efa.t b/test/50-efa.t index 418e17e4bfced7d3243463e17f57c4c86a4af487..c09e582941cfe30f48ac67c1c960c754ab1ffe1c 100644 --- a/test/50-efa.t +++ b/test/50-efa.t @@ -2,7 +2,7 @@ use strict; use warnings; use 5.010; -use Test::Command tests => 48; +use Test::Command tests => 51; my $efa = 'bin/efa'; my $testarg = "E HBf MH HBf"; @@ -86,8 +86,10 @@ for my $opt (qw/-d --date/) { $cmd->stderr_is_eq($err_date); } -$cmd = Test::Command->new(cmd => "$efa --version"); +for my $opt (qw/-v --version/) { + $cmd = Test::Command->new(cmd => "$efa $opt"); -$cmd->exit_is_num(0); -$cmd->stdout_like($re_version); -$cmd->stderr_is_eq(''); + $cmd->exit_is_num(0); + $cmd->stdout_like($re_version); + $cmd->stderr_is_eq(''); +}