diff options
author | James E Keenan <jkeenan@cpan.org> | 2016-06-22 21:14:17 -0400 |
---|---|---|
committer | James E Keenan <jkeenan@cpan.org> | 2016-06-22 21:14:17 -0400 |
commit | 9bee02b7edf5d070fa02f515e8489d8175daaa9c (patch) | |
tree | f5e56a907e1b4892849a2ea5e0bdf354e216737f | |
parent | e8340ba23c44f80ce6c13571dfbcca119d56701a (diff) | |
download | perl-libnet-9bee02b7edf5d070fa02f515e8489d8175daaa9c.tar.gz |
Adapt tests to Test2 revision of Test::More::note().
In each of the three t/*_ipv6.t test files, a helper subroutine was defined whose last statement was an invocation of Test::More::note(). Under the old Test::Builder framework, note() would always have returned a defined value of 0. However, in the Test2 framework -- which is in Perl 5 blead as of 5.25.2 -- note() calls the release() method from lib/Test2/API/Context.pm -- and release() has a bare return, which is treated as 'undef' in scalar context. Perl's exit function wants to return a non-negative integer value. Hence, we should guarantee that these helper subroutines -- which are invoked by exit() calls in each of the three files -- explicitly return 0 upon success.
-rw-r--r-- | t/nntp_ipv6.t | 1 | ||||
-rw-r--r-- | t/pop3_ipv6.t | 1 | ||||
-rw-r--r-- | t/smtp_ipv6.t | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/t/nntp_ipv6.t b/t/nntp_ipv6.t index 1992618..768489a 100644 --- a/t/nntp_ipv6.t +++ b/t/nntp_ipv6.t @@ -63,4 +63,5 @@ sub nntp_server { } } note("NNTP dialog done"); + return 0; } diff --git a/t/pop3_ipv6.t b/t/pop3_ipv6.t index 1c88c1a..db31128 100644 --- a/t/pop3_ipv6.t +++ b/t/pop3_ipv6.t @@ -63,4 +63,5 @@ sub pop3_server { } note("POP3 dialog done"); + return 0; } diff --git a/t/smtp_ipv6.t b/t/smtp_ipv6.t index a31b6ff..f430721 100644 --- a/t/smtp_ipv6.t +++ b/t/smtp_ipv6.t @@ -65,4 +65,5 @@ sub smtp_server { } note("SMTP dialog done"); + return 0; } |