For tied file handle calls, use PUSH* when we know that the stack has space.
[p5sagit/p5-mst-13.2.git] / lib / diagnostics.t
CommitLineData
f5ad5489 1#!./perl
2
3BEGIN {
7b903762 4 chdir '..' if -d '../pod' && -d '../t';
5 @INC = 'lib';
f5ad5489 6}
7
8b56d6ff 8use Test::More tests => 3;
f5ad5489 9
d23f0205 10BEGIN { use_ok('diagnostics') }
f5ad5489 11
d23f0205 12require base;
f5ad5489 13
d23f0205 14eval {
15 'base'->import(qw(I::do::not::exist));
16};
f5ad5489 17
f0e510f6 18like( $@, qr/^Base class package "I::do::not::exist" is empty/);
8b56d6ff 19
20# Test for %.0f patterns in perldiag, added in 5.11.0
21close STDERR;
22open STDERR, ">", \my $warning
23 or die "Couldn't redirect STDERR to var: $!";
24warn('gmtime(nan) too large');
25like $warning, qr/\(W overflow\) You called/, '%0.f patterns';