diff options
author | Andy Lester <andy@petdance.com> | 2005-04-07 12:44:42 -0500 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2005-04-08 12:18:42 +0000 |
commit | 2db3864ffcaccbf832bbb3814303b4f6beef8963 (patch) | |
tree | afec42c61fea1276efdac7452e1ec685c6676c57 /t/op/caller.t | |
parent | 45977657b0fa2c29b268b817f40e6b295a501d39 (diff) | |
download | perl-2db3864ffcaccbf832bbb3814303b4f6beef8963.tar.gz |
Removing Y2K warnings
Message-ID: <20050407224442.GA23895@petdance.com>
p4raw-id: //depot/perl@24205
Diffstat (limited to 't/op/caller.t')
-rw-r--r-- | t/op/caller.t | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/t/op/caller.t b/t/op/caller.t index c97191b14a..4d90aeafd3 100644 --- a/t/op/caller.t +++ b/t/op/caller.t @@ -67,21 +67,23 @@ ok( $c[4], "hasargs true with unknown sub" ); sub testwarn { my $w = shift; - is( (caller(0))[9], $w, "warnings"); + is( (caller(0))[9], $w, "warnings match caller"); } # NB : extend the warning mask values below when new warnings are added { no warnings; - BEGIN { is( ${^WARNING_BITS}, "\0" x 12, 'warning bits' ) } + BEGIN { is( ${^WARNING_BITS}, "\0" x 12, 'all bits off via "no warnings"' ) } testwarn("\0" x 12); + use warnings; - BEGIN { is( ${^WARNING_BITS}, "U" x 12, 'warning bits' ) } - BEGIN { testwarn("U" x 12); } + BEGIN { is( ${^WARNING_BITS}, "UUUUUUUUUUU\025", 'default bits on via "use warnings"' ); } + BEGIN { testwarn("UUUUUUUUUUU\025", "#1"); } # run-time : # the warning mask has been extended by warnings::register - testwarn("UUUUUUUUUUUU\001"); + testwarn("UUUUUUUUUUUU"); + use warnings::register; - BEGIN { is( ${^WARNING_BITS}, "UUUUUUUUUUUU\001", 'warning bits' ) } - testwarn("UUUUUUUUUUUU\001"); + BEGIN { is( ${^WARNING_BITS}, "UUUUUUUUUUUU", 'warning bits on via "use warnings::register"' ) } + testwarn("UUUUUUUUUUUU","#3"); } |