+2011-08-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ cosmetics: typofix in the name of a function in the TAP driver
+ * lib/tap-driver (testuite_error): Renamed ...
+ (testsuite_error): ... to this, and minor related reformatting.
+
2011-08-06 Stefano Lattarini <stefano.lattarini@gmail.com>
tap: scripts with a SKIP plan but with exit status != 0 must error
sub report ($;$);
sub start (@);
sub stringify_test_result ($);
-sub testuite_error ($);
+sub testsuite_error ($);
sub unget_tap_line ($);
sub write_test_results ();
sub yn ($);
}
else
{
- testuite_error $msg;
+ testsuite_error $msg;
}
}
write_test_results;
print $result . $msg;
}
-sub testuite_error ($)
+sub testsuite_error ($)
{
report "ERROR", "- $_[0]";
}
sub handle_tap_plan ($)
{
my $plan = shift;
- testuite_error "multiple test plans" if $plan_seen;
+ testsuite_error "multiple test plans" if $plan_seen;
$plan_seen = 1;
# TAP plan must be either in the first or in the last line.
if ($lineno > 1 && peek_tap_line)
{
- testuite_error "test plan in middle of output";
+ testsuite_error "test plan in middle of output";
return;
}
# Nothing more to do, unless the plan contains a SKIP directive.
{
my ($bailout, $msg) = ($_[0], "Bail out!");
$msg .= " " . $bailout->explanation if $bailout->explanation;
- testuite_error $msg;
+ testsuite_error $msg;
finish;
}
}
if (!$plan_seen)
{
- testuite_error "missing test plan";
+ 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";
- testuite_error (sprintf "too %s tests run (expected %d, got %d)",
- $bad_amount, $planned, $run);
+ testsuite_error (sprintf "too %s tests run (expected %d, got %d)",
+ $bad_amount, $planned, $run);
}
finish;
}