4 chdir '..' if -d '../pod' && -d '../t';
8 use Test::More tests => 6;
10 BEGIN { use_ok('diagnostics') }
15 'base'->import(qw(I::do::not::exist));
18 like( $@, qr/^Base class package "I::do::not::exist" is empty/);
20 # Test for %.0f patterns in perldiag, added in 5.11.0
22 open STDERR, ">", \my $warning
23 or die "Couldn't redirect STDERR to var: $!";
24 warn('gmtime(nan) too large');
25 like $warning, qr/\(W overflow\) You called/, '%0.f patterns';
30 warn("accept() on closed socket spanner");
31 like $warning, qr/"accept" in perlfunc/, 'L<foo/bar> links';
33 # L<foo|bar/baz> links
37 'Lexing code attempted to stuff non-Latin-1 character into Latin-1 input';
38 like $warning, qr/using lex_stuff_pvn or similar/, 'L<foo|bar/baz>';
40 # Multiple messages with the same description
43 warn 'Code point 0x%X is not Unicode, may not be portable';
44 like $warning, qr/W utf8/,
45 'Message sharing its description with the following message';