Ticket #846: fix-14-warnings.patch
| File fix-14-warnings.patch, 2.2 KB (added by rhebus, 3 years ago) |
|---|
-
t/14-warnings.t
Index: t/14-warnings.t
7 7 use Test::NoWarnings; 8 8 use Padre::Document::Perl::Beginner; 9 9 10 package Padre; 11 # Fake the Padre instance, P::D::P::Beginner only needs Padre->ide->config 12 use Padre::Config(); 13 my $SINGLETON = undef; 14 sub ide { 15 my $class = shift; 16 return $SINGLETON if $SINGLETON; 17 $SINGLETON = bless {}, $class; 18 $SINGLETON->{config} = Padre::Config->read; 19 return $SINGLETON; 20 } 21 sub config { 22 my $self = shift; 23 return $self->{config}; 24 } 25 26 package main; 27 10 28 our $SKIP; 11 29 12 30 unless ( $ENV{AUTOMATED_TESTING} ) { … … 38 56 39 57 $b->check( slurp( 'lib/' . $file ) ); 40 58 my $result = $b->error || ''; 41 ok( ( $result eq '' ), 'Check ' . $file . ': ' . $result);59 ok( ( $result eq '' ), "Check $file: $result" ); 42 60 } 43 61 44 62 … … 50 68 51 69 sub slurp { 52 70 my $file = shift; 53 open my $fh, '<', $file or die $!;71 open my $fh, '<', $file or die "Couldn't open $file: $!"; 54 72 local $/ = undef; 55 73 my $buffer = <$fh>; 56 74 close $fh;
