mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
examples: bistromathic: strengthen tests
* examples/c/bistromathic/bistromathic.test: here. * examples/test: Be clearer on failing tests.
This commit is contained in:
@@ -45,9 +45,20 @@ run 0 '0.16
|
||||
cat >input <<EOF
|
||||
*
|
||||
EOF
|
||||
run 0 "err: 1.1: syntax error: expected end of file or - or ( or end of line or double precision number or function or variable before *"
|
||||
run 0 'err: 1.1: syntax error: expected end of file or - or ( or end of line or double precision number or function or variable before *'
|
||||
|
||||
cat >input <<EOF
|
||||
1 + 2 * * 3
|
||||
EOF
|
||||
run 0 "err: 1.9: syntax error: expected - or ( or double precision number or function or variable before *"
|
||||
run 0 'err: 1.9: syntax error: expected - or ( or double precision number or function or variable before *'
|
||||
|
||||
cat >input <<EOF
|
||||
100%
|
||||
EOF
|
||||
run 0 '100
|
||||
err: 1.4: error: invalid character'
|
||||
|
||||
cat >input <<EOF
|
||||
1 / 0
|
||||
EOF
|
||||
run 0 'err: 1.1-5: error: division by zero'
|
||||
|
||||
@@ -123,7 +123,7 @@ exp:
|
||||
{
|
||||
if ($r == 0)
|
||||
{
|
||||
yyerror (&@$, "division by zero");
|
||||
yyerror (&@$, "error: division by zero");
|
||||
YYERROR;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -62,6 +62,6 @@
|
||||
|
||||
<<EOF>> return TOK_EOF;
|
||||
|
||||
. yyerror (yylloc, "syntax error, invalid character");
|
||||
. yyerror (yylloc, "error: invalid character");
|
||||
%%
|
||||
/* Epilogue (C code). */
|
||||
|
||||
Reference in New Issue
Block a user