This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Don't refer to specific line numbers in test code regex
authorDave Rolsky <autarch@urth.org>
Sun, 30 Jan 2011 15:18:42 +0000 (09:18 -0600)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 31 Jan 2011 02:33:53 +0000 (18:33 -0800)
lib/Carp.t

index 8240cd3..ffbb222 100644 (file)
@@ -307,7 +307,7 @@ for my $bodge_job (2, 1, 0) {
     for (0..2) {
        my $previous_package = $package;
        ++$package;
-       like( $got, qr/${package}::long\($warning\) called at $previous_package line 7/, "Correct arguments for $package" );
+       like( $got, qr/${package}::long\($warning\) called at $previous_package line \d+/, "Correct arguments for $package" );
     }
     my $arg = $bodge_job ? $warning : 42;
     like( $got, qr!A::long\($arg\) called at.+\b(?i:carp\.t) line \d+!,