about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-13 07:34:00 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-13 07:34:00 +0000
commited49ddd42509043e2d30b4f65aeaab7feee39ec7 (patch)
tree3d3871d3eb9f6e633311a150720d2a8b7c8f6696
parent8fb1fece8ecaff5996c3916103dae3df0a5f75ee (diff)
downloadglibc-ed49ddd42509043e2d30b4f65aeaab7feee39ec7.tar.gz
glibc-ed49ddd42509043e2d30b4f65aeaab7feee39ec7.tar.xz
glibc-ed49ddd42509043e2d30b4f65aeaab7feee39ec7.zip
Work around inconsistency with expanding ~/ in shell.
-rwxr-xr-xposix/globtest.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/posix/globtest.sh b/posix/globtest.sh
index 4a009cc92b..b8509fcaaa 100755
--- a/posix/globtest.sh
+++ b/posix/globtest.sh
@@ -217,7 +217,12 @@ echo ~/ | cmp - $testout || result=1
 ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
 ${common_objpfx}posix/globtest -q -t "$testdir" "~"$USER |
 sort > $testout
-eval echo ~$USER | cmp - $testout || result=1
+# Some shell incorrectly(?) convert ~/ into // if ~ expands to /.
+if test ~/ = //; then
+    echo / | cmp - $testout || result=1
+else
+    echo ~/ | cmp - $testout || result=1
+fi
 
 # Tilde expansion shouldn't match a file
 ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \