Fix closing stdin in TestLib.pm

Andrew Dunstan <andrew@dunslane.net>

Commit: 792dba73c8f30528e51c4967d3be8ec4bdc5234b
Author: Andrew Dunstan <andrew@dunslane.net>
Date: 2019-11-26T21:32:06Z
Releases: 13.0
Fix closing stdin in TestLib.pm

Commit 9af34f3c6b naively assumed that all non-windows platforms would
have pseudoterminals and that perl would have IO::Pty. Such is not the
case. Instead of assumung anything, test for the presence of IO::Pty and
only use code that might depend on it if it's present. The test result is
exposed in $TestLib::have_io_pty so that it can be conveniently used in
SKIP tests.

Discussion: https://postgr.es/m/20191126044110.GB5435@paquier.xyz

Files

PathChange+/−
src/test/perl/TestLib.pm modified +19 −9

Discussion

Cited messages not in the archive: 20191126044110.GB5435@paquier.xyz