Subject: | t/confess.t fails test #2 |
$ perl -Mblib t/confess.t
1..3
ok 1 - eval fails
not ok 2 - error message
# Failed test 'error message'
# at t/confess.t line 8.
# 'Forgive me... at t/confess.t line 5.
# main::f() called at t/confess.t line 6
# eval {...} called at t/confess.t line 6
# '
# doesn't match '(?^msx:line\s5\n.*line\s6)'
ok 3 - Complete override
# Looks like you failed 1 test of 3.
The problem is the literal '.' just before the newline, at "line 5.".
Here's a patch to make that 'dot' optional (so that we don't break
systems that don't include it, but allow to pass those that do):
$ git diff
diff --git a/t/confess.t b/t/confess.t
index bcc8691..79dabfd 100644
--- a/t/confess.t
+++ b/t/confess.t
@@ -5,7 +5,7 @@ use Test::More tests => 3;
sub f { Carp::confess("Forgive me..."); };
ok !defined eval { f() } => 'eval fails';
my $exception = $@;
- like $exception, qr{line\s${\(__LINE__-3)}\n.*line\s${\(__LINE__-2)}}xms
+ like $exception,
qr{line\s${\(__LINE__-3)}\.?\n.*line\s${\(__LINE__-2)}}xms
=> 'error message';
unlike $exception, qr{\*\* Incomplete caller override detected;
\@DB::args were not set \*\*}
=> 'Complete override';
My system:
Ubuntu Linux 12.04 LTS, 64bit.
Perlbrewed Perl, version 5.16.1
$perl -v
This is perl 5, version 16, subversion 1 (v5.16.1) built for x86_64-linux
Carp v1.26
Test::More v0.98
version v0.99
Want v0.21
After making this change all tests pass and installation proceeds
without further incident.