test-init.sh: avoid a subshell
authorJim Meyering <meyering@redhat.com>
Mon, 9 Jan 2012 09:12:18 +0000 (10:12 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 9 Jan 2012 09:12:28 +0000 (10:12 +0100)
* 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.

ChangeLog
tests/test-init.sh

index 08468ce..9048131 100644 (file)
--- 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.
index 3368a99..c644609 100755 (executable)
@@ -63,7 +63,7 @@ EOF
   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