From: Akim Demaille Date: Sat, 23 Jun 2001 17:14:34 +0000 (+0000) Subject: * tests/torture.at (AC_ARG_VAR): Make it a single test instead of X-Git-Tag: AUTOCONF-2.50a~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=984307c4cee58dbb9bc4e29d4144a1664696a3e8;p=thirdparty%2Fautoconf.git * tests/torture.at (AC_ARG_VAR): Make it a single test instead of three as failures are unlikely, and speed matters. --- diff --git a/ChangeLog b/ChangeLog index 40e000552..5d48d05c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-06-23 Akim Demaille + + * tests/torture.at (AC_ARG_VAR): Make it a single test instead of + three as failures are unlikely, and speed matters. + 2001-06-23 Akim Demaille * doc/autoconf.texi (Redefined M4 Macros): New. diff --git a/tests/torture.at b/tests/torture.at index 95a1b36ec..72d068ed0 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -14,13 +14,38 @@ AT_BANNER([[Testing config.status. ## AC_ARG_VAR. ## ## ------------ ## -# AT_CHECK_AC_ARG_VAR(TITLE, FIRST-VALUE, SECOND-VALUE) -# ----------------------------------------------------- +# AT_CHECK_AC_ARG_VAR(FIRST-VALUE, SECOND-VALUE) +# ---------------------------------------------- # Check that AC_ARG_VAR caches the latest values, diagnoses # inconsistances, and arms config.status. m4_define([AT_CHECK_AC_ARG_VAR], -[ -AT_SETUP([AC_ARG_VAR: $1]) +[rm -f config.cache + +# Initial value. +m4_ifval([$1], + [precious='$1'; export precious], + [unset precious]) +AT_CHECK_CONFIGURE([--config-cache]) +AT_CHECK([cat file], [], [`$1' +]) + +# Testing --recheck. +unset precious +AT_CHECK([./config.status --recheck], [], [ignore]) +AT_CHECK([./config.status], [], [ignore]) +AT_CHECK([cat file], [], [`$1' +]) + +# Second value. +m4_ifval([$2], + [precious='$2'; export precious], + [unset precious]) +AT_CHECK_CONFIGURE([--config-cache], [1], [], [ignore]) + +])# AT_CHECK_AC_ARG_VAR + + +AT_SETUP([AC_ARG_VAR]) # We don't want to run this test if this shell doesn't support # `unset'. @@ -44,36 +69,16 @@ AT_DATA([file.in], AT_CHECK_AUTOCONF -# Initial value. -m4_ifval([$2], - [precious='$2'; export precious], - [unset precious]) -AT_CHECK_CONFIGURE([--config-cache]) -AT_CHECK([cat file], [], [`$2' -]) +# Set a precious variable +AT_CHECK_AC_ARG_VAR([], [apple of my eye]) -# Testing --recheck. -unset precious -AT_CHECK([./config.status --recheck], [], [ignore]) -AT_CHECK([./config.status], [], [ignore]) -AT_CHECK([cat file], [], [`$2' -]) +# Unset a precious variable +AT_CHECK_AC_ARG_VAR([apple of my eye], []) -# Second value. -m4_ifval([$3], - [precious='$3'; export precious], - [unset precious]) -AT_CHECK_CONFIGURE([--config-cache], [1], [], [ignore]) +# Change a precious variable +AT_CHECK_AC_ARG_VAR([apple of my eye], [orange of my eye]) AT_CLEANUP -])# AT_CHECK_AC_ARG_VAR - -AT_CHECK_AC_ARG_VAR([set a precious variable], - [], [apple of my eye]) -AT_CHECK_AC_ARG_VAR([unset a precious variable], - [apple of my eye], []) -AT_CHECK_AC_ARG_VAR([change a precious variable], - [apple of my eye], [orange of my eye])