]> git.saurik.com Git - bison.git/blobdiff - tests/input.at
Replace file name scan-gram-c.c with scangram-c.c and
[bison.git] / tests / input.at
index 886c14add0ebef8e5797f7254ecd8a37f3c5e9c2..99946e9da1e60c57c6c5b4904ae00c40a8f0185f 100644 (file)
@@ -13,8 +13,8 @@
 
 # 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., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
 
 AT_BANNER([[Input Processing.]])
 
@@ -132,7 +132,7 @@ AT_SETUP([Torturing the Scanner])
 
 AT_DATA([input.y], [])
 AT_CHECK([bison input.y], [1], [],
-[[input.y:1.1: syntax error, unexpected "end of file"
+[[input.y:1.1: syntax error, unexpected end of file
 ]])
 
 
@@ -297,3 +297,24 @@ exp: "MY TOKEN";
 AT_CHECK([bison -o input.c input.y])
 
 AT_CLEANUP
+
+
+## --------- ##
+## Require.  ##
+## --------- ##
+
+m4_define([AT_CHECK_REQUIRE],
+[AT_SETUP([Require $1])
+AT_DATA_GRAMMAR([input.y],
+[[%require "$1";
+%%
+empty_file:;
+]])
+AT_CHECK([bison -o input.c input.y], $2, [], ignore)
+AT_CLEANUP
+])
+
+AT_CHECK_REQUIRE(1.0, 0)
+AT_CHECK_REQUIRE(AT_PACKAGE_VERSION, 0)
+## FIXME: Some day augment this version number.
+AT_CHECK_REQUIRE(100.0, 63)