X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/a7867f53b3d63c94a5f73ffd48629069919ab3d4..9987d1b3cce14fd74c4bc382048254697c2de945:/tests/skeletons.at?ds=sidebyside diff --git a/tests/skeletons.at b/tests/skeletons.at index 79f903ee..0e121d5a 100644 --- a/tests/skeletons.at +++ b/tests/skeletons.at @@ -1,28 +1,26 @@ # Checking skeleton support. -*- Autotest -*- # Copyright (C) 2007 Free Software Foundation, Inc. -# This program is free software; you can redistribute it and/or modify +# 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. - +# the Free Software Foundation, either version 3 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., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program. If not, see . -AT_BANNER([[Skeletons Support.]]) +AT_BANNER([[Skeleton Support.]]) ## ------------------------------ ## -## relative skeleton file names. ## +## Relative skeleton file names. ## ## ------------------------------ ## -AT_SETUP([[relative skeleton file names]]) +AT_SETUP([[Relative skeleton file names]]) AT_CHECK([[mkdir tmp]]) @@ -78,11 +76,11 @@ AT_CHECK([[cat input-cmd-line.tab.c]], [[0]], AT_CLEANUP -## ------------------------------ ## -## installed skeleton file name. ## -## ------------------------------ ## +## ------------------------------- ## +## Installed skeleton file names. ## +## ------------------------------- ## -AT_SETUP([[installed skeleton file name]]) +AT_SETUP([[Installed skeleton file names]]) m4_pushdef([AT_GRAM], [[%{ @@ -141,3 +139,31 @@ AT_PARSER_CHECK([[./input-gram]], [[1]], [], m4_popdef([AT_GRAM]) AT_CLEANUP + + +## ------------------------------------------------------ ## +## %define boolean variables: invalid skeleton defaults. ## +## ------------------------------------------------------ ## + +AT_SETUP([[%define boolean variables: invalid skeleton defaults]]) + +AT_CHECK([[mkdir tmp]]) + +AT_DATA([[skel.c]], +[[b4_percent_define_default([[foo]], [[bogus value]]) +b4_percent_define_flag_if([[foo]]) +]]) + +AT_DATA([[input.y]], +[[%skeleton "./skel.c" +%% +start: ; +]]) + +AT_CHECK([[bison input.y]], [[1]], [[]], +[[[Bison:b4_percent_define_default]:0.0: invalid value for %define boolean variable `foo' +]]) + +AT_CLEANUP + +