diff options
Diffstat (limited to 'dist/constant/t/constant.t')
-rw-r--r-- | dist/constant/t/constant.t | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dist/constant/t/constant.t b/dist/constant/t/constant.t index a42b7d2281..85a9355a19 100644 --- a/dist/constant/t/constant.t +++ b/dist/constant/t/constant.t @@ -9,7 +9,7 @@ END { @warnings && print STDERR join "\n- ", "accumulated warnings:", @warnings use strict; -use Test::More tests => 95; +use Test::More tests => 96; my $TB = Test::More->builder; BEGIN { use_ok('constant'); } @@ -341,3 +341,9 @@ $kloong = 'schlozhauer'; is ($@, ''); is_deeply (\@value, []); } + +{ + local $SIG{'__WARN__'} = sub { die "WARNING: $_[0]" }; + eval 'use constant undef, 5; 1'; + like $@, qr/\ACan't use undef as constant name at /; +} |