From 638bfa93a009987e57bd7eaa8b2a1c1067a3652a Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 20 Jan 2015 11:53:42 +0000 Subject: users/19756: test for case of closing fd with no error message --- Test/A04redirect.ztst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Test') diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst index cb6778874..13f1f7cb5 100644 --- a/Test/A04redirect.ztst +++ b/Test/A04redirect.ztst @@ -152,11 +152,16 @@ >hello >goodbye + ({exec 3<&- } 2>/dev/null + exec 3<&- + read foo <&-) +1:'<&-' redirection with numeric fd (no error message on failure) + (exec {varid}<&0 exec {varid}<&- print About to close a second time >&2 read {varid}<&-) -1:'<&-' redirection +1:'<&-' redirection with fd in variable (error message on failure) ?About to close a second time *?\(eval\):*: failed to close file descriptor * -- cgit 1.4.1