changeset 16259:d571b7ad9c91

test-init.sh: avoid a subshell * tests/test-init.sh: Remove protective subshell. Suggested by Bernhard Voelker. While a subshell is normally required to protect against older shells (Solaris, FreeBSD) that warn about a missing program before performing redirection, the shell-selection tests performed by init.sh probably exclude any offending shell.
author Jim Meyering <meyering@redhat.com>
date Mon, 09 Jan 2012 10:12:18 +0100
parents 51e5394036c6
children 852b7a7a689a
files ChangeLog tests/test-init.sh
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-01-09  Jim Meyering  <meyering@redhat.com>
+
+	test-init.sh: avoid a subshell
+	* tests/test-init.sh: Remove protective subshell.
+	Suggested by Bernhard Voelker.  While a subshell is normally
+	required to protect against older shells (Solaris, FreeBSD) that
+	warn about a missing program before performing redirection, the
+	shell-selection tests performed by init.sh probably exclude any
+	offending shell.
+
 2012-01-08  Bruno Haible  <bruno@clisp.org>
 
 	setlocale tests: Avoid test failure on Solaris 11 2011-11.
--- a/tests/test-init.sh
+++ b/tests/test-init.sh
@@ -63,7 +63,7 @@
   sed 's/	.*//;/^@@/d' out > k && mv k out
 
   # Compare against expected output only if compare is using diff -u.
-  if (diff -u out out < /dev/null) > /dev/null 2>&1; then
+  if diff -u out out < /dev/null > /dev/null 2>&1; then
     compare exp out || fail=1
   fi
   case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac