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 Dec 9, 2017
1 parent 88e87a7 commit 795d8b0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/mosh
Expand Up @@ -433,6 +433,7 @@ my $term_init = 1;

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

my @cmdline = @ARGV;

Expand Down Expand Up @@ -499,9 +500,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 795d8b0

Please sign in to comment.