diff options
Diffstat (limited to 't/lib/io_sel.t')
-rwxr-xr-x | t/lib/io_sel.t | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/t/lib/io_sel.t b/t/lib/io_sel.t index e0d7a45338..85e14ab0c0 100755 --- a/t/lib/io_sel.t +++ b/t/lib/io_sel.t @@ -10,7 +10,7 @@ BEGIN { select(STDERR); $| = 1; select(STDOUT); $| = 1; -print "1..21\n"; +print "1..23\n"; use IO::Select 1.09; @@ -114,3 +114,19 @@ print "ok 20\n"; $sel->remove($sel->handles); print "not " unless $sel->count == 0 && !defined($sel->bits); print "ok 21\n"; + +# check warnings +$SIG{__WARN__} = sub { + ++ $w + if $_[0] =~ /^Call to depreciated method 'has_error', use 'has_exception'/ + } ; +$w = 0 ; +IO::Select::has_error(); +print "not " unless $w == 0 ; +$w = 0 ; +print "ok 22\n" ; +use warnings 'IO::Select' ; +IO::Select::has_error(); +print "not " unless $w == 1 ; +$w = 0 ; +print "ok 23\n" ; |