From: Ralf Wildenhues Date: Fri, 4 Jan 2008 17:10:04 +0000 (+0100) Subject: Actually test that @configure_input@ is expanded correctly. X-Git-Tag: v2.62~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad236d83f72dfd9a928a52ac03ddb85145560ae7;p=thirdparty%2Fautoconf.git 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. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index b247fd41..4ff1a7c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-03-02 Ralf Wildenhues + + 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 Be nice with file systems that don't handle unusual characters. diff --git a/tests/torture.at b/tests/torture.at index 0eaea177..ec86e22c 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -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 \ '\'' \'\'' " b & * ? name ' # "restore font-lock + 'with funny \ '\'' \'\'' " | 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