about summary refs log tree commit diff
path: root/posix/globtest.sh
diff options
context:
space:
mode:
Diffstat (limited to 'posix/globtest.sh')
-rwxr-xr-xposix/globtest.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/posix/globtest.sh b/posix/globtest.sh
index 6c088301b0..40d95d5dcb 100755
--- a/posix/globtest.sh
+++ b/posix/globtest.sh
@@ -235,7 +235,12 @@ echo ~ | cmp - $testout || result=1
 ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
 ${common_objpfx}posix/globtest -q -t "$testdir" "~/" |
 sort > $testout
-echo ~/ | 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
+endif
 
 # Test tilde expansion with username
 ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \