die @_, " at $file line $line.\n";
}
-sub sanitize_comment {
+sub _sanitize_comment {
$_[0] =~ s/\n+\z//;
$_[0] =~ s/#/\\#/g;
$_[0] =~ s/\n/\n# /g;
$plan = SKIP_ALL;
$plan_str = '1..0 # SKIP';
if (defined $value) {
- sanitize_comment($value);
+ _sanitize_comment($value);
$plan_str .= " $value" if length $value;
}
} else {
my $skip_str = "ok $test # skip";
if (defined $reason) {
- sanitize_comment($reason);
+ _sanitize_comment($reason);
$skip_str .= " $reason" if length $reason;
}
++$failed;
}
if (defined $desc) {
- sanitize_comment($desc);
+ _sanitize_comment($desc);
$test_str .= " - $desc" if length $desc;
}
return if $no_diag;
my $msg = join '', map { defined($_) ? $_ : 'undef' } @_;
- sanitize_comment($msg);
+ _sanitize_comment($msg);
return unless length $msg;
local $\;
my $bail_out_str = 'Bail out!';
if (defined $desc) {
- sanitize_comment($desc);
+ _sanitize_comment($desc);
$bail_out_str .= " $desc" if length $desc; # Two spaces
}