changeset 16835:a80277ccfb15

init.sh: don't let bash aliases interfere with tests * tests/init.sh: Undefine any pre-defined aliases if the selected shell is bash. This avoids problems for those who alias standard commands to non-conforming uses, like those reported in http://bugs.gnu.org/11256. Suggested by Tim Mooney <Tim.Mooney@ndsu.edu>.
author Jim Meyering <meyering@redhat.com>
date Tue, 08 May 2012 10:55:21 +0200
parents 9ea40aad6df8
children 308e8faf5e8a
files ChangeLog tests/init.sh
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-05-08  Jim Meyering  <meyering@redhat.com>
+
+	init.sh: don't let bash aliases interfere with tests
+	* tests/init.sh: Undefine any pre-defined aliases if the selected shell
+	is bash.  This avoids problems for those who alias standard commands to
+	non-conforming uses, like those reported in http://bugs.gnu.org/11256.
+	Suggested by Tim Mooney <Tim.Mooney@ndsu.edu>.
+
 2012-05-07  Paul Eggert  <eggert@cs.ucla.edu>
 
 	stdint: be more consistent with glibc, SunOS libc
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -207,6 +207,9 @@
   fi
 fi
 
+# If this is bash, turn off all aliases.
+test -n "$BASH_VERSION" && unalias -a
+
 test -n "$EXEEXT" && shopt -s expand_aliases
 
 # Enable glibc's malloc-perturbing option.