init.sh: don't let bash aliases interfere with tests
authorJim Meyering <meyering@redhat.com>
Tue, 8 May 2012 08:55:21 +0000 (10:55 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 8 May 2012 09:03:02 +0000 (11:03 +0200)
* 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>.

ChangeLog
tests/init.sh

index db6b620..268fbe5 100644 (file)
--- 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
index ae86714..d5cd294 100644 (file)
@@ -207,6 +207,9 @@ else
   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.