Skip to content

Commit

Permalink
[mosh] Use --test to trigger configuration unit test
Browse files Browse the repository at this point in the history
mobile-shell#431

Add undocumented --test option that will trigger the unit test in
the ConfigFile class.

Signed-off-by: Earl Chew <earl_chew@yahoo.com>
  • Loading branch information
earlchew committed Feb 9, 2014
1 parent e1bd9bf commit c8f3701
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/mosh
Expand Up @@ -429,6 +429,7 @@ my $term_init = 1;

my $help = undef;
my $version = undef;
my $unittest = undef;

my @cmdline = @ARGV;

Expand Down Expand Up @@ -495,9 +496,16 @@ GetOptions( 'client=s' => \$client,
'init!' => \$term_init,
'help' => \$help,
'version' => \$version,
'test' => \$unittest,
'fake-proxy!' => \my $fake_proxy,
'bind-server=s' => \$bind_ip) or die $usage;

if ( defined $unittest ) {
$configFile->testSplitLine();
$configFile->testConfigFile();
exit(0);
}

die $usage if ( defined $help );
die $version_message if ( defined $version );

Expand Down

0 comments on commit c8f3701

Please sign in to comment.