]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Actually test that @configure_input@ is expanded correctly.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 4 Jan 2008 17:10:04 +0000 (18:10 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 2 Mar 2008 12:13:46 +0000 (13:13 +0100)
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Actually check generated file contents for the name of the
generated file, using AC_PROG_FGREP and $FGREP.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/torture.at

index b247fd41a9fe30c0f04691c74c0951b4b8ca5824..4ff1a7c4586595f0e98c8dd57f2a9b5ceb71dfbd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-03-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Actually test that @configure_input@ is expanded correctly.
+       * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
+       Actually check generated file contents for the name of the
+       generated file, using AC_PROG_FGREP and $FGREP.
+
 2008-03-01  Benoit Sigoure  <tsuna@lrde.epita.fr>
 
        Be nice with file systems that don't handle unusual characters.
index 0eaea17755d701f3b99184fb8c537982a352d87a..ec86e22ceb5f6b1d20165b838d25214a7932023b 100644 (file)
@@ -134,6 +134,7 @@ AT_SETUP([[AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS]])
 
 AT_DATA([configure.ac],
 [[AC_INIT
+AC_PROG_FGREP
 rm -f -r header var-header file var-file link var-link command var-command
 echo 'OK' >input
 
@@ -262,23 +263,27 @@ AT_CHECK_CONFIG_CREATION_NOWRITE(link)
 AT_CHECK([grep ac_write_fail config.status], [1])
 
 # Check that --file and --header accept funny file names
+AT_DATA([fgrep.in],
+[[FGREP="@FGREP@"
+]])
+./config.status --file=fgrep:fgrep.in
+. ./fgrep
 
 x=
 export x
 for file in \
   'with  funny '\'' $x & #! name' \
   'file with  funny \ '\'' \'\'' $ & #!*? name' \
-  'with  funny \ '\'' \'\'' " <a >b & * ? name ' # "restore font-lock
+  'with  funny \ '\'' \'\'' " <a >b & * ? name ' # "restore font-lock
 do
   # The function func_sanitize_file_name comes from tools.at
   file=`func_sanitize_file_name "$file"`
   cat >"$file.in" <<'END'
-OK
+@configure_input@
 END
   AT_CHECK([./config.status "--file=$file:$file.in"],
           [0], [ignore])
-  AT_CHECK([grep OK "$file"], [], [OK
-])
+  AT_CHECK([$FGREP "$file" "$file"], [0], [ignore])
   AT_CHECK([./config.status "--header=$file:$file.in"],
           [0], [ignore])
   # Run the same test a 2nd time to see that config.status does not recreate
@@ -290,8 +295,7 @@ config.status: $file is unchanged
   AT_CHECK_NOESCAPE([grep ' & ' "$file"], [],
 [/* $file.  Generated from $file.in by configure.  */
 ])
-  AT_CHECK([grep OK "$file"], [], [OK
-])
+  AT_CHECK([$FGREP "$file" "$file"], [0], [ignore])
 done
 AT_CLEANUP