]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/spawn.t
t/common: move unix_server to t/httpd-corner.t
[public-inbox.git] / t / spawn.t
index 1d71b26df1f342b5c1faca7f0ae1ceeee06e53d2..ebebfb57eafc078577c4b79bc6021fce8d6c4846 100644 (file)
--- a/t/spawn.t
+++ b/t/spawn.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2018 all contributors <meta@public-inbox.org>
+# Copyright (C) 2015-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -71,13 +71,13 @@ use PublicInbox::Spawn qw(which spawn popen_rd);
        is($buf, "hello\n", 'tied gets works');
        is(sysread($fh, $buf, 6), 0, 'sysread got EOF');
        $? = 1;
-       close $fh;
+       ok(close($fh), 'close succeeds');
        is($?, 0, '$? set properly');
 }
 
 {
        my $fh = popen_rd([qw(false)]);
-       close $fh;
+       ok(!close($fh), 'close fails on false');
        isnt($?, 0, '$? set properly: '.$?);
 }