[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] init.sh: don't let bash aliases interfere with tests
From: |
Jim Meyering |
Subject: |
[PATCH 1/2] init.sh: don't let bash aliases interfere with tests |
Date: |
Tue, 08 May 2012 14:57:28 +0200 |
FYI, I've pushed these two patches:
>From a396e729684ec533c504dd3e619f669834821688 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 8 May 2012 10:55:21 +0200
Subject: [PATCH 1/2] 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 <address@hidden>.
---
ChangeLog | 8 ++++++++
tests/init.sh | 3 +++
2 files changed, 11 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index db6b620..268fbe5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-05-08 Jim Meyering <address@hidden>
+
+ 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 <address@hidden>.
+
2012-05-07 Paul Eggert <address@hidden>
stdint: be more consistent with glibc, SunOS libc
diff --git a/tests/init.sh b/tests/init.sh
index ae86714..d5cd294 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -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.
--
1.7.10.1.487.ga3935e6
>From a3a049672d410b1deba8f1537016f2ece42b4e88 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 8 May 2012 11:54:26 +0200
Subject: [PATCH 2/2] init.sh: explain why $EXEEXT support uses aliases rather
than functions
* tests/init.sh: Add a comment.
---
ChangeLog | 3 +++
tests/init.sh | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 268fbe5..e202346 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2012-05-08 Jim Meyering <address@hidden>
+ init.sh: explain why EXEEXT support uses aliases rather than functions
+ * tests/init.sh: Add a comment.
+
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
diff --git a/tests/init.sh b/tests/init.sh
index d5cd294..f525a7c 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -210,6 +210,11 @@ fi
# If this is bash, turn off all aliases.
test -n "$BASH_VERSION" && unalias -a
+# Note that when supporting $EXEEXT (transparently mapping from PROG_NAME to
+# PROG_NAME.exe), we want to support hyphen-containing names like test-acos.
+# That is part of the shell-selection test above. Why use aliases rather
+# than functions? Because support for hyphen-containing aliases is more
+# widespread than that for hyphen-containing function names.
test -n "$EXEEXT" && shopt -s expand_aliases
# Enable glibc's malloc-perturbing option.
--
1.7.10.1.487.ga3935e6
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 1/2] init.sh: don't let bash aliases interfere with tests,
Jim Meyering <=