Module Name: src Committed By: kre Date: Sat May 14 00:33:02 UTC 2016
Modified Files: src/tests/bin/sh: t_redir.sh Log Message: Add another test for the 48875 fix fallout... To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/bin/sh/t_redir.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/bin/sh/t_redir.sh diff -u src/tests/bin/sh/t_redir.sh:1.8 src/tests/bin/sh/t_redir.sh:1.9 --- src/tests/bin/sh/t_redir.sh:1.8 Wed May 11 17:43:17 2016 +++ src/tests/bin/sh/t_redir.sh Sat May 14 00:33:02 2016 @@ -1,4 +1,4 @@ -# $NetBSD: t_redir.sh,v 1.8 2016/05/11 17:43:17 kre Exp $ +# $NetBSD: t_redir.sh,v 1.9 2016/05/14 00:33:02 kre Exp $ # # Copyright (c) 2016 The NetBSD Foundation, Inc. # All rights reserved. @@ -800,6 +800,21 @@ validate_fn_redirects_body() f "$B" <&3 >&4 done >&2' + # And this tests a similar condition with that same fix + cat <<- 'DONE' >Script + f() { + printf '%s' " hello $1" + } + exec 3>&1 + echo $( for i in a b c + do printf '%s' @$i; f $i >&3; done >foo + ) + printf '%s\n' foo=$(cat foo) + DONE + atf_check -s exit:0 -e empty \ + -o inline:' hello a hello b hello c\nfoo=@a@b@c\n' \ + ${TEST_SH} Script + # Tests with sh reading stdin, which is not quite the same internal # mechanism. echo ". ./f-def || echo >&2 FAIL