diff options
author | Eric Wong <e@80x24.org> | 2019-11-04 00:43:14 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-11-04 02:06:41 +0000 |
commit | b32b47fb12a3043d748f723802de923d9043d7ff (patch) | |
tree | 07291642fea1324a2469ecb9febc5fb4a5789d23 /t/spawn.t | |
parent | 17d2778c404c25c459f320a7f92913d17569fc59 (diff) | |
download | public-inbox-b32b47fb12a3043d748f723802de923d9043d7ff.tar.gz |
While I've never seen "git log" fail on its own, it could happen one day and we should be prepared to abort indexing when it happens. Beef up tests for t/spawn.t to ensure close() behaves on popen_rd the way we expect it to.
Diffstat (limited to 't/spawn.t')
-rw-r--r-- | t/spawn.t | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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: '.$?); } |