diff options
author | Jerry D. Hedden <jdhedden@cpan.org> | 2009-09-03 09:47:41 +0200 |
---|---|---|
committer | Steffen Mueller <smueller@cpan.org> | 2009-09-03 09:47:41 +0200 |
commit | 96471c6b3e9cad6e88559f66a5fdf6902c5e7b4a (patch) | |
tree | d9379bee979289cf98e05cff2acf861e6b4d44a7 | |
parent | 8ff19c00d111fa650b32e95778b91c8d7afe47f7 (diff) | |
download | perl-96471c6b3e9cad6e88559f66a5fdf6902c5e7b4a.tar.gz |
Suppress deprecation warnings from test output
Minor modification of the original patch:
Added comments, skipped the change to Time/Local.t which has been
handled by 8ff19c00d111fa650b32e95778b91c8d7afe47f7.
-rw-r--r-- | lib/bigfloatpl.t | 12 | ||||
-rw-r--r-- | lib/bigintpl.t | 13 |
2 files changed, 23 insertions, 2 deletions
diff --git a/lib/bigfloatpl.t b/lib/bigfloatpl.t index d67d13d1d4..a3810e3ab0 100644 --- a/lib/bigfloatpl.t +++ b/lib/bigfloatpl.t @@ -5,7 +5,17 @@ BEGIN { @INC = '../lib'; } -require "bigfloat.pl"; +{ + # Silence the deprecation warnings from bigfloat.pl for the purpose + # of testing. These tests will be removed along with bigfloat.pl in + # the next major release of perl. + local $SIG{__WARN__} = sub { + if ($_[0] !~ /deprecated/) { + print(STDERR @_); + } + }; + require "bigfloat.pl"; +} $test = 0; $| = 1; diff --git a/lib/bigintpl.t b/lib/bigintpl.t index 569db20667..9245683eb1 100644 --- a/lib/bigintpl.t +++ b/lib/bigintpl.t @@ -4,7 +4,18 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } -require "bigint.pl"; + +{ + # Silence the deprecation warnings from bigint.pl for the purpose + # of testing. These tests will be removed along with bigint.pl in + # the next major release of perl. + local $SIG{__WARN__} = sub { + if ($_[0] !~ /deprecated/) { + print(STDERR @_); + } + }; + require "bigint.pl"; +} $test = 0; $| = 1; |