[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
New tests.
From: |
Pascal Bart |
Subject: |
New tests. |
Date: |
Mon, 20 Aug 2001 16:06:48 +0000 (GMT) |
Hi,
I suggest this patch, to check the new flags %***_extension, and
their priorities with other output control method.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/bison/bison/ChangeLog,v
retrieving revision 1.173.2.4
diff -u -u -r1.173.2.4 ChangeLog
--- ChangeLog 2001/08/16 20:48:02 1.173.2.4
+++ ChangeLog 2001/08/20 14:03:45
@@ -1,3 +1,7 @@
+2001-08-20 Pascal Bart <address@hidden>
+
+ * tests/suite.at: Exercise %header_extension and %source_extension.
+
2001-08-16 Marc Autret <address@hidden>
* src/reader.c (parse_dquoted_param): New.
Index: tests/suite.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/suite.at,v
retrieving revision 1.4
diff -u -u -r1.4 suite.at
--- tests/suite.at 2001/01/18 14:47:09 1.4
+++ tests/suite.at 2001/08/20 14:03:45
@@ -29,6 +29,7 @@
AT_CHECK_BISON_FLAGS([-o foo.tab.c], [foo.output foo.tab.c foo.tab.h])
AT_CHECK_BISON_FLAGS([-y], [y.output y.tab.c y.tab.h])
AT_CHECK_BISON_FLAGS([-b bar], [bar.output bar.tab.c bar.tab.h])
+AT_CHECK_BISON_FLAGS([-g -o foo.c], [foo.c foo.h foo.output foo.vcg])
@@ -52,10 +53,34 @@
# The sames, but using the % directives.
AT_CHECK_BISON_PERCENT([], [foo.output foo.tab.c foo.tab.h])
-# AT_CHECK_BISON_PERCENT([%output foo.c], [foo.c foo.h foo.output])
-# AT_CHECK_BISON_PERCENT([%output foo.tab.c], [foo.output foo.tab.c foo.tab.h])
AT_CHECK_BISON_PERCENT([%yacc], [y.output y.tab.c y.tab.h])
-# AT_CHECK_BISON_PERCENT([%file_prefix bar], [bar.output bar.tab.c bar.tab.h])
+
+# AT_CHECK_BISON_PERCENT_FLAGS(GRAMMAR_OPTIONS, FLAGS, EXPECTED-FILES-SORTED)
+# ---------------------------------------------------------------------------
+AT_DEFINE([AT_CHECK_BISON_PERCENT_FLAGS],
+[AT_SETUP([Output files: $1.])
+AT_DATA([foo.y],
+[[$1
+%defines
+%verbose
+%%
+foo: {}
+]])
+rm -rf $3
+AT_CHECK([bison foo.y $2], 0, ignore, ignore)
+AT_CHECK([ls $3 | sort | tr '\n' ' ' | sed 's/.$//g'], 0, [$3])
+rm -f $3
+AT_CLEANUP
+])
+
+AT_CHECK_BISON_PERCENT_FLAGS(
+[%source_extension ".cpp"] [%header_extension ".hhh"],
+[],
+[foo.output foo.tab.cpp foo.tab.hhh])
+AT_CHECK_BISON_PERCENT_FLAGS(
+[%source_extension ".cc"] [%header_extension ".hh"],
+[-o foo.c],
+[foo.c foo.h foo.output])
AT_INCLUDE([calc.at])
AT_INCLUDE([regression.at])
Pascal Bart (address@hidden)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- New tests.,
Pascal Bart <=