In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/ee970fec4a4c7fa56e833aae4fb7ebc2cb81486f?hp=0ae8220a76e5cb7e8e9e802a3afbc48c757cda41>
- Log ----------------------------------------------------------------- commit ee970fec4a4c7fa56e833aae4fb7ebc2cb81486f Author: Matthew Horsfall <wolfs...@gmail.com> Date: Mon Nov 14 08:52:36 2016 -0500 Silence deprecation warnings in tests ----------------------------------------------------------------------- Summary of changes: t/io/utf8.t | 1 + t/op/readline.t | 2 ++ t/uni/readline.t | 11 +++++++---- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/t/io/utf8.t b/t/io/utf8.t index 3909dc8..2b70059 100644 --- a/t/io/utf8.t +++ b/t/io/utf8.t @@ -313,6 +313,7 @@ is($failed, undef); # [perl #23428] Somethings rotten in unicode semantics open F, ">$a_file"; binmode F, ":utf8"; + no warnings qw(deprecated); syswrite(F, $a = chr(0x100)); close F; is( ord($a), 0x100, '23428 syswrite should not downgrade scalar' ); diff --git a/t/op/readline.t b/t/op/readline.t index bfe90d5..2ee1534 100644 --- a/t/op/readline.t +++ b/t/op/readline.t @@ -214,6 +214,7 @@ SKIP: { pipe $in, $out; binmode $out, ':utf8'; binmode $in, ':utf8'; + no warnings qw(deprecated); syswrite $out, "...\n"; $line .= readline $in; @@ -226,6 +227,7 @@ SKIP: { pipe $in, $out; binmode $out, ':utf8'; binmode $in, ':utf8'; + no warnings qw(deprecated); syswrite $out, "\x{2080}...\n"; $line .= readline $in; diff --git a/t/uni/readline.t b/t/uni/readline.t index c733f69..893a290 100644 --- a/t/uni/readline.t +++ b/t/uni/readline.t @@ -27,10 +27,13 @@ like($@, qr/Modification of a read-only value attempted/, '[perl #19566]'); } use strict; - -open á, '.' and sysread á, $_, 1; -my $err = $! + 0; -close á; +my $err; +{ + no warnings qw(deprecated); + open á, '.' and sysread á, $_, 1; + $err = $! + 0; + close á; +} SKIP: { skip "you can read directories as plain files", 2 unless( $err ); -- Perl5 Master Repository