From 11d8ed522235c2e5c705d6345e7cd55f2a47b316 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 20 Aug 2011 13:59:45 +0200 Subject: [PATCH] cosmetics: fix botched indentation in perl TAP driver * lib/tap-driver.pl (main, Getopt::Long::GetOptions): Fix improper or botched indentation. --- ChangeLog | 6 ++++++ lib/tap-driver.pl | 31 ++++++++++++++++--------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index bdccc31f9..c64cf6e0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-08-20 Stefano Lattarini + + cosmetics: fix botched indentation in perl TAP driver + * lib/tap-driver.pl (main, Getopt::Long::GetOptions): Fix + improper or botched indentation. + 2011-08-20 Stefano Lattarini coverage: some more tests on corner cases of TAP support diff --git a/lib/tap-driver.pl b/lib/tap-driver.pl index 7043815f3..9e1ece433 100755 --- a/lib/tap-driver.pl +++ b/lib/tap-driver.pl @@ -73,7 +73,8 @@ my $log_file = undef; my $trs_file = undef; my $diag_string = "#"; -Getopt::Long::GetOptions ( +Getopt::Long::GetOptions + ( 'help' => sub { print $HELP; exit 0; }, 'version' => sub { print "$ME $VERSION\n"; exit 0; }, 'test-name=s' => \$test_script_name, @@ -450,22 +451,22 @@ sub main (@) if (!$bailed_out) { if (!$plan_seen) - { - testsuite_error "missing test plan"; - } - elsif ($parser->tests_planned != $parser->tests_run) - { - my ($planned, $run) = ($parser->tests_planned, $parser->tests_run); - my $bad_amount = $run > $planned ? "many" : "few"; - testsuite_error (sprintf "too %s tests run (expected %d, got %d)", - $bad_amount, $planned, $run); - } + { + testsuite_error "missing test plan"; + } + elsif ($parser->tests_planned != $parser->tests_run) + { + my ($planned, $run) = ($parser->tests_planned, $parser->tests_run); + my $bad_amount = $run > $planned ? "many" : "few"; + testsuite_error (sprintf "too %s tests run (expected %d, got %d)", + $bad_amount, $planned, $run); + } } if (!$cfg{"ignore-exit"} && !$bailed_out) - { - my $msg = get_test_exit_message (); - testsuite_error $msg if $msg; - } + { + my $msg = get_test_exit_message (); + testsuite_error $msg if $msg; + } write_test_results; close LOG or die "closing $log_file: $!\n"; exit 0; -- 2.47.2