File: import.t

package info (click to toggle)
libwarnings-illegalproto-perl 0.001003-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 116 kB
  • ctags: 3
  • sloc: perl: 50; makefile: 4
file content (17 lines) | stat: -rw-r--r-- 315 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use strict;
use Test::More;

no warnings;
use warnings::illegalproto;

my $warn;
$SIG{__WARN__} = sub { $warn = $_[0] };

my $x = eval "sub (frew) { 1 }";
like $warn, qr/prototype/, 'dies on "bad" prototype';

undef $warn;
eval 'my $f = undef . "foo"';
is $warn, undef, 'other warnings not enabled';

done_testing;