3 # Validation suite for Bison.
4 # Copyright 2000 Free Software Foundation, Inc.
8 ## ---------------------------- ##
9 ## Checking output file names. ##
10 ## ---------------------------- ##
12 # AT_CHECK_BISON_FLAGS(FLAGS, EXPECTED-FILES-SORTED)
13 # --------------------------------------------------
14 AT_DEFINE
([AT_CHECK_BISON_FLAGS
],
15 [AT_SETUP
([Output files
: $1.
])
21 AT_CHECK
([bison
-dv foo.y
$1], 0, ignore
, ignore
)
22 AT_CHECK
([ls $2 | sort | tr '\n' ' ' | sed 's/.$//g'], 0, [$2])
27 AT_CHECK_BISON_FLAGS
([], [foo.output foo.tab.c foo.tab.h
])
28 AT_CHECK_BISON_FLAGS
([-o foo.c
], [foo.c foo.h foo.output
])
29 AT_CHECK_BISON_FLAGS
([-o foo.tab.c
], [foo.output foo.tab.c foo.tab.h
])
30 AT_CHECK_BISON_FLAGS
([-y], [y.output y.tab.c y.tab.h
])
31 AT_CHECK_BISON_FLAGS
([-b bar
], [bar.output bar.tab.c bar.tab.h
])
35 # AT_CHECK_BISON_PERCENT(GRAMMAR-OPTIONS, EXPECTED-FILES-SORTED)
36 # --------------------------------------------------------------
37 AT_DEFINE
([AT_CHECK_BISON_PERCENT
],
38 [AT_SETUP
([Output files
: $1.
])
47 AT_CHECK
([bison foo.y
], 0, ignore
, ignore
)
48 AT_CHECK
([ls $2 | sort | tr '\n' ' ' | sed 's/.$//g'], 0, [$2])
53 # The sames, but using the % directives.
54 AT_CHECK_BISON_PERCENT
([], [foo.output foo.tab.c foo.tab.h
])
55 # AT_CHECK_BISON_PERCENT([%output foo.c], [foo.c foo.h foo.output])
56 # AT_CHECK_BISON_PERCENT([%output foo.tab.c], [foo.output foo.tab.c foo.tab.h])
57 AT_CHECK_BISON_PERCENT
([%yacc], [y.output y.tab.c y.tab.h
])
58 # AT_CHECK_BISON_PERCENT([%file_prefix bar], [bar.output bar.tab.c bar.tab.h])
61 AT_INCLUDE
([regression.
at])