autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05no-escape-on-AT_CHECK-strings


From: derek
Subject: 05no-escape-on-AT_CHECK-strings
Date: Thu, 27 Mar 2003 18:41:06 +0000

Index: ChangeLog
2003-03-27  Derek Price  <address@hidden>

        * lib/autotest/general.m4: Eliminate main loop and reorganize test
        layout in order to allow scripting around test groups.
        * lib/autotest/general.m4 (AT_CHECK): Allow shell substitution in the
        STDOUT & STDERR strings.
        * tests/semantics.at: AS_ESCAPE some strings passed to AT_CHECK.
        * tests/torture.at: Ditto.

--- autoconf-script-wrapable-autotests/lib/autotest/general.m4  2003-03-26 
23:00:04.000000000 -0500
+++ autoconf-no-escape-on-AT_CHECK-strings/lib/autotest/general.m4      
2003-03-27 12:53:43.000000000 -0500
@@ -838,6 +838,9 @@
 # should normally exit with STATUS, while producing expected STDOUT and
 # STDERR contents.
 #
+# Double quoted shell substitution happens on literal strings passed in
+# for STDOUT & STDERR.  Use AS_ESCAPE on the strings to avoid this behavior.
+#
 # STATUS, STDOUT, and STDERR are not checked if equal to `ignore'.
 #
 # If STDOUT is `expout', then stdout is compared to the content of the file
@@ -912,14 +915,14 @@
         ignore, [(echo stderr:; cat $at_stderr) >&5],
         experr, [$at_diff experr $at_stderr >&5 || at_failed=:],
         [],     [$at_diff $at_devnull $at_stderr >&5 || at_failed=:],
-        [echo >>$at_stderr; echo "AS_ESCAPE([$4])" | $at_diff - $at_stderr >&5 
|| at_failed=:])
+        [echo >>$at_stderr; echo "$4" | $at_diff - $at_stderr >&5 || 
at_failed=:])
 dnl Check stdout.
 m4_case([$3],
         stdout, [(echo stdout:; tee stdout <$at_stdout) >&5],
         ignore, [(echo stdout:; cat $at_stdout) >&5],
         expout, [$at_diff expout $at_stdout >&5 || at_failed=:],
         [],     [$at_diff $at_devnull $at_stdout >&5 || at_failed=:],
-        [echo >>$at_stdout; echo "AS_ESCAPE([$3])" | $at_diff - $at_stdout >&5 
|| at_failed=:])
+        [echo >>$at_stdout; echo "$3" | $at_diff - $at_stdout >&5 || 
at_failed=:])
 dnl Check exit val.  Don't `skip' if we are precisely checking $? = 77.
 case $at_status in
 m4_case([$2],
--- autoconf-script-wrapable-autotests/tests/semantics.at       2002-10-16 
02:38:50.000000000 -0400
+++ autoconf-no-escape-on-AT_CHECK-strings/tests/semantics.at   2003-03-27 
12:29:32.000000000 -0500
@@ -123,8 +123,8 @@
 ])
 
 AT_CHECK([sed 's/  */ /g;s/^ //;s/ $//' config.libobjs], [],
-         [autoconf_ftnirp$U.o
-])
+         [AS_ESCAPE([autoconf_ftnirp$U.o
+])])
 
 AT_CLEANUP([config.libobjs])
 
--- autoconf-script-wrapable-autotests/tests/torture.at 2002-11-06 
05:29:22.000000000 -0500
+++ autoconf-no-escape-on-AT_CHECK-strings/tests/torture.at     2003-03-27 
12:26:47.000000000 -0500
@@ -59,8 +59,8 @@
          [precious='$1'; export precious],
          [unset precious])
 AT_CHECK_CONFIGURE([--config-cache -q])
-AT_CHECK([cat file], [], [`$1'
-])
+AT_CHECK([cat file], [], [AS_ESCAPE([`$1'
+])])
 
 # Testing --recheck: 1. have the environment `forget' about PRECIOUS.
 unset precious
@@ -68,8 +68,8 @@
 AT_CHECK([./config.status --recheck], [], [ignore])
 AT_CHECK([./config.status], [], [ignore])
 # 3. Check that file contains the old value of PRECIOUS.
-AT_CHECK([cat file], [], [`$1'
-])
+AT_CHECK([cat file], [], [AS_ESCAPE([`$1'
+])])
 
 # Second value: we should issue an error here: the value
 # has changed!
@@ -259,11 +259,11 @@
 
 AT_CHECK_CONFIGURE([one="\"'$ " --enable-two="\" ' $" --with-three=" \"'$"|
                       sed -n -e 's/^result=//p'], 0,
-                   ["'$ " ' $ "'$
-])
+                   [AS_ESCAPE(["'$ " ' $ "'$
+])])
 AT_CHECK([./config.status --recheck | sed -n 's/^result=//p'], 0,
-         ["'$ " ' $ "'$
-])
+         [AS_ESCAPE(["'$ " ' $ "'$
+])])
 
 AT_CLEANUP
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]