summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-06-13 12:07:14 +0200
committerJim Meyering <meyering@redhat.com>2011-06-13 12:42:18 +0200
commit6fb9aeedd1b858a61d5cbf7f15782adf29ff733a (patch)
tree834793b02c3a7f0d3305a1bb739e358b06667285 /tests
parent2f5c2a25ed35547d1626d11c5deceb4ff87b978b (diff)
downloadcoreutils-6fb9aeedd1b858a61d5cbf7f15782adf29ff733a.tar.xz
init.sh: accommodate shells for which 1>&$stderr_fileno_ fails
* tests/init.sh (warn_): Use eval to work around a bug in some shells, like those of Solaris 10 and HP-UX 11.11. Improved by Stefano Lattarini.
Diffstat (limited to 'tests')
-rw-r--r--tests/init.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/init.sh b/tests/init.sh
index 14f2e26e0..25850afea 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -74,7 +74,7 @@ Exit () { set +e; (exit $1); exit $1; }
# the reason for skip/failure to console, rather than to the .log files.
: ${stderr_fileno_=2}
-warn_ () { echo "$@" 1>&$stderr_fileno_; }
+warn_ () { eval 'echo "$@" 1>&'"$stderr_fileno_"; }
fail_ () { warn_ "$ME_: failed test: $@"; Exit 1; }
skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; }
framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }