Skip to content
Browse files

correct tests for new Carp

  • Loading branch information...
1 parent 4e2ca57 commit 84d892a7a7d311ba0c25ac7d7993f5cea81c1308 @rjbs committed
Showing with 9 additions and 4 deletions.
  1. +3 −0 Changes
  2. +2 −2 lib/Sub/Install.pm
  3. +2 −1 t/install.t
  4. +2 −1 t/reinstall.t
View
3 Changes
@@ -1,5 +1,8 @@
Revision history for Sub-Install
+0.926 2012-02-26
+ cope with terminal dots from new Carp
+
0.925 2009-01-16
add repo loc to metadata
View
4 lib/Sub/Install.pm
@@ -12,11 +12,11 @@ Sub::Install - install subroutines into packages easily
=head1 VERSION
-version 0.925
+version 0.926
=cut
-our $VERSION = '0.925';
+our $VERSION = '0.926';
=head1 SYNOPSIS
View
3 t/install.t
@@ -21,7 +21,7 @@ use warnings;
SKIP: {
skip "can't run this test without Test::Output", 1 unless $to_avail;
Sub::Install::install_sub({ code => \&ok, as => 'tmp_ok' });
-
+
my $expected_warning = <<'END_WARNING';
Subroutine main::tmp_ok redefined at t/install.t line 31
Prototype mismatch: sub main::tmp_ok ($;$) vs ($$;$) at t/install.t line 31
@@ -31,6 +31,7 @@ END_WARNING
sub { Sub::Install::install_sub({ code => \&is, as => 'tmp_ok' }) }
);
+ $stderr =~ s!\.$!!gm;
$stderr =~ s!\\!/!g;
is(
$stderr,
View
3 t/reinstall.t
@@ -23,7 +23,7 @@ use warnings;
SKIP: {
skip "can't run this test without Test::Output", 1 unless $to_avail;
Sub::Install::reinstall_sub({ code => \&ok, as => 'tmp_ok' });
-
+
my $expected_warning = <<'END_WARNING';
Prototype mismatch: sub main::tmp_ok ($;$) vs ($$;$) at t/reinstall.t line 32
END_WARNING
@@ -33,6 +33,7 @@ END_WARNING
);
$stderr =~ s!\\!/!g;
+ $stderr =~ s!\.$!!g;
is(
$stderr,
$expected_warning,

0 comments on commit 84d892a

Please sign in to comment.
Something went wrong with that request. Please try again.