From d26ddc825605b6b6098fcc4be5dc33ac2a8a48d1 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 27 Oct 2012 14:45:51 +0200 Subject: [PATCH] tests: merge some grepping tests on Yacc support * t/yacc.sh, t/yacc2.sh: Merge ... * t/yacc-grepping.sh: ... into this test. * t/list-of-tests.mk: Adjust. Signed-off-by: Stefano Lattarini --- t/list-of-tests.mk | 3 +-- t/{yacc2.sh => yacc-grepping.sh} | 16 ++++++++++---- t/yacc.sh | 37 -------------------------------- 3 files changed, 13 insertions(+), 43 deletions(-) rename t/{yacc2.sh => yacc-grepping.sh} (80%) delete mode 100755 t/yacc.sh diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index 499433888..db0fa0075 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -1246,8 +1246,6 @@ t/werror3.sh \ t/werror4.sh \ t/whoami.sh \ t/xsource.sh \ -t/yacc.sh \ -t/yacc2.sh \ t/yacc4.sh \ t/yacc5.sh \ t/yacc7.sh \ @@ -1270,6 +1268,7 @@ t/yacc-depend.sh \ t/yacc-depend2.sh \ t/yacc-dist-nobuild-subdir.sh \ t/yacc-dist-nobuild.sh \ +t/yacc-grepping.sh \ t/yacc-line.sh \ t/yacc-mix-c-cxx.sh \ t/yacc-nodist.sh \ diff --git a/t/yacc2.sh b/t/yacc-grepping.sh similarity index 80% rename from t/yacc2.sh rename to t/yacc-grepping.sh index 64e542121..19036c4c7 100755 --- a/t/yacc2.sh +++ b/t/yacc-grepping.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2012 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 @@ -14,9 +14,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Test to make sure intermediate .h file is not generated nor removed -# if (AM_)?YFLAGS do not contain -d. Requested by Jim Meyering. -# See also the related semantic test 'yacc-d-basic.sh'. +# Some grep-based checks on yacc support: +# +# - Make sure intermediate .c file is built from yacc source. +# Report from Thomas Morgan. +# +# - Make sure intermediate .h file is not generated nor removed +# if (AM_)?YFLAGS do not contain '-d'. +# Requested by Jim Meyering. . ./defs || exit 1 @@ -38,18 +43,21 @@ END cp Makefile.am Makefile.src $AUTOMAKE -a +$FGREP 'zardoz.c' Makefile.in # If zardoz.h IS mentioned, fail. $FGREP 'zardoz.h' Makefile.in && exit 1 cp Makefile.src Makefile.am echo 'AM_YFLAGS = -d' >> Makefile.am $AUTOMAKE +$FGREP 'zardoz.c' Makefile.in # If zardoz.h is NOT mentioned, fail. $FGREP 'zardoz.h' Makefile.in cp Makefile.src Makefile.am echo 'AM_YFLAGS = ' >> Makefile.am $AUTOMAKE +$FGREP 'zardoz.c' Makefile.in # If zardoz.h IS mentioned, fail. $FGREP 'zardoz.h' Makefile.in && exit 1 diff --git a/t/yacc.sh b/t/yacc.sh deleted file mode 100755 index 0a838a9c0..000000000 --- a/t/yacc.sh +++ /dev/null @@ -1,37 +0,0 @@ -#! /bin/sh -# Copyright (C) 1996-2012 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, 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, see . - -# Test to make sure intermediate .c file is built from yacc source. -# Bug from Thomas Morgan. - -. ./defs || exit 1 - -cat >> configure.ac << 'END' -AC_PROG_CC -AC_PROG_YACC -END - -cat > Makefile.am <<'END' -bin_PROGRAMS = zardoz -zardoz_SOURCES = zardoz.y -END - -$ACLOCAL -$AUTOMAKE -a - -$FGREP 'zardoz.c' Makefile.in - -: -- 2.47.2