Subject: | Line numbers reported in test |
Date: | Wed, 6 Nov 2019 07:58:11 -0500 |
To: | bug-Test-Expr [...] rt.cpan.org |
From: | "F. Li" <li.hansen.inc [...] gmail.com> |
Hi, Dr. Conway,
Test::Expr is wonderful! ... however it reports success and failures on the
wrong line.
Modifying
# Build the test code...
qq{
{
$test_setup
if ($test_expr) {
Test::More::ok(1, $desc);
}
else {
fail($desc); @diagnostics diag q{};
}
}
};
to
my $testcode=qq{
{
$test_setup
if ($test_expr) {
Test::More::ok(1, $desc);
}
else {
fail($desc); @diagnostics diag q{};
}
}
};
$testcode=~ s{\n *}{ }gsm;
return $testcode;
fixes this.
Thank you again for Test::Expr (and all those too many to mention modules)!