blob: ee0c16074322d5f8c966bd1e2e5d24f8e75ab373 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!./perl
BEGIN {
chdir '..' if -d '../pod' && -d '../t';
@INC = 'lib';
}
use Test::More tests => 3;
BEGIN { use_ok('diagnostics') }
require base;
eval {
'base'->import(qw(I::do::not::exist));
};
like( $@, qr/^Base class package "I::do::not::exist" is empty/);
# Test for %.0f patterns in perldiag, added in 5.11.0
close STDERR;
open STDERR, ">", \my $warning
or die "Couldn't redirect STDERR to var: $!";
warn('gmtime(nan) too large');
like $warning, qr/\(W overflow\) You called/, '%0.f patterns';
|