# HG changeset patch # User Jim Meyering # Date 1326100338 -3600 # Node ID d571b7ad9c9154aa9f10c7667b3902ae27d107c9 # Parent 51e5394036c696d2cce20d4d062541e00397fcef 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. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2012-01-09 Jim Meyering + + 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 setlocale tests: Avoid test failure on Solaris 11 2011-11. diff --git a/tests/test-init.sh b/tests/test-init.sh --- 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