From 265bbc68557909113227427f2f9c2a0889eaf898 Mon Sep 17 00:00:00 2001 From: David MacKenzie Date: Tue, 27 Sep 1994 21:35:06 +0000 Subject: [PATCH] Initial revision --- testsuite/autoconf.s/defines.exp | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 testsuite/autoconf.s/defines.exp diff --git a/testsuite/autoconf.s/defines.exp b/testsuite/autoconf.s/defines.exp new file mode 100644 index 00000000..44be7d80 --- /dev/null +++ b/testsuite/autoconf.s/defines.exp @@ -0,0 +1,49 @@ +# -*- TCL -*- +# Check for a 1-1 correspondence between acconfig.h and acspecific.m4. +# Copyright (C) 1994 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +# Adapted by David MacKenzie from a shell script by Paul Eggert. + +set top_srcdir "$srcdir/.." + +set uscript {s/^#undef[ ]*\([^ ]*\).*/\1/p} +set undefs [exec sed -n $uscript $top_srcdir/acconfig.h] + +set dscript {s/.*AC_DEFINE[A-Z_]*(\([^$,)]*\).*/\1/p; s/.*AC_CHECK_TYPE(\([^$,)]*\).*/\1/p} +set defines [exec sed -n $dscript $top_srcdir/acspecific.m4] + +send_user "Checking acspecific.m4 for definitions of symbols in acconfig.h...\n" + +foreach u $undefs { + send_user "$u\n" + if {[lsearch -exact $defines $u] != -1} { + pass "$u" + } else { + fail "$u, not defined" + } +} + +send_user "Checking acconfig.h for symbols defined in acspecific.m4...\n" + +foreach d $defines { + send_user "$d\n" + if {[lsearch -exact $undefs $d] != -1} { + pass "$d" + } else { + fail "$d, no entry" + } +}