Skip to content
Snippets Groups Projects
Commit 849e589b authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Add short option for --version

parent 1c1cd84f
No related branches found
No related tags found
No related merge requests found
...@@ -220,7 +220,7 @@ GetOptions( ...@@ -220,7 +220,7 @@ GetOptions(
't|time=s' => \$time, 't|time=s' => \$time,
'to=s{2}' => \@to, 'to=s{2}' => \@to,
'to-type=s' => \$to_type, '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=s{2}' => \@via,
'via-type=s' => \$via_type, 'via-type=s' => \$via_type,
'w|walk-speed=s' => \$walk_speed, 'w|walk-speed=s' => \$walk_speed,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
use strict; use strict;
use warnings; use warnings;
use 5.010; use 5.010;
use Test::Command tests => 48; use Test::Command tests => 51;
my $efa = 'bin/efa'; my $efa = 'bin/efa';
my $testarg = "E HBf MH HBf"; my $testarg = "E HBf MH HBf";
...@@ -86,8 +86,10 @@ for my $opt (qw/-d --date/) { ...@@ -86,8 +86,10 @@ for my $opt (qw/-d --date/) {
$cmd->stderr_is_eq($err_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->exit_is_num(0);
$cmd->stdout_like($re_version); $cmd->stdout_like($re_version);
$cmd->stderr_is_eq(''); $cmd->stderr_is_eq('');
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment