File: basic.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 (14 lines) | stat: -rw-r--r-- 351 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use strictures 1;
use Test::More;
no warnings::illegalproto;

my $x = eval "sub (frew) { 1 }";
is 1, $x->(), 'does not die on "bad" prototype';

eval 'my $f = (undef) . "foo"';
like $@, qr/uninitialized/, 'does not override uninitialized warnings';

eval 'my $f = 5 + "foo"';
like $@, qr/numeric/, 'does not override numeric warnings';

done_testing;