From ead12d3f08f5a04db3fef1a70ee62e1835ce2633 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sun, 23 Jan 2011 12:54:35 +0100 Subject: [PATCH] tests defs: sanitize IFS * tests/defs.in ($IFS): Define to , , . ($sp): New variable, holding a single whitespace character. ($tab): New variable, holding a tabulation character. ($nl): New variable, holding a newline character. --- ChangeLog | 8 ++++++++ tests/defs.in | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index 48f0ce2a7..a12a8d3ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-01-23 Stefano Lattarini + + tests defs: sanitize IFS + * tests/defs.in ($IFS): Define to , , . + ($sp): New variable, holding a single whitespace character. + ($tab): New variable, holding a tabulation character. + ($nl): New variable, holding a newline character. + 2011-01-22 Ralf Wildenhues tests: fix VPATH auto-expansion workarounds. diff --git a/tests/defs.in b/tests/defs.in index ee19dbe9a..21fcc34de 100644 --- a/tests/defs.in +++ b/tests/defs.in @@ -34,6 +34,18 @@ else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +# A single whitespace character. +sp=' ' +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' + +# As autoconf-generated configure scripts do, ensure that IFS +# is defined initially, so that saving and restoring $IFS works. +IFS=$sp$tab$nl + # Ensure we are running from the right directory. test -f ./defs || { echo "defs: not found in current directory" 1>&2 -- 2.47.2