init.sh: ensure that IFS is defined, just in case...
authorJim Meyering <meyering@redhat.com>
Sat, 13 Nov 2010 09:51:06 +0000 (10:51 +0100)
committerJim Meyering <meyering@redhat.com>
Sat, 13 Nov 2010 09:51:06 +0000 (10:51 +0100)
* tests/init.sh (setup_): Ensure that IFS is defined,
so that saving and restoring it works as expected.  This
appears to be useful at least for an old version of dash
from a long time ago (RH 6).  See here for details:
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/436/focus=455

ChangeLog
tests/init.sh

index 0c4a9fb..5656ded 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2010-11-13  Jim Meyering  <meyering@redhat.com>
 
+       init.sh: ensure that IFS is defined, just in case...
+       * tests/init.sh (setup_): Ensure that IFS is defined,
+       so that saving and restoring it works as expected.  This
+       appears to be useful at least for an old version of dash
+       from a long time ago (RH 6).  See here for details:
+       http://thread.gmane.org/gmane.comp.gnu.coreutils.general/436/focus=455
+
        maint.mk: tighten "test a == b" check
        * top/maint.mk (sc_prohibit_test_double_equal): Restrict this
        test to files that contain something like #!/bin/sh.
index a57de77..14f3b19 100644 (file)
@@ -330,6 +330,12 @@ setup_()
     || fail_ "failed to create temporary directory in $initial_cwd_"
   cd "$test_dir_"
 
+  # As autoconf-generated configure scripts do, ensure that IFS
+  # is defined initially, so that saving and restoring $IFS works.
+  gl_init_sh_nl_='
+'
+  IFS=" ""     $gl_init_sh_nl_"
+
   # This trap statement, along with a trap on 0 below, ensure that the
   # temporary directory, $test_dir_, is removed upon exit as well as
   # upon receipt of any of the listed signals.