* src/conflicts.c (conflicts_print): Don't print file name twice

when %expect fails because there were no conflicts.
* doc/bison.texinfo (Expect Decl): Tighten up wording in previous
change.
* tests/conflicts.at (%expect not enough, %expect too much):
(%expect with reduce conflicts): Adjust to new behavior.

* src/conflicts.c (conflicts_print): Unsatisfied %expectation are
errors.
* NEWS: Document this.
* doc/bison.texinfo (Expect Decl): Likewise.
This commit is contained in:
Paul Eggert
2005-11-18 18:16:44 +00:00
parent d1ff7a7cc6
commit 035aa4a0bb
5 changed files with 65 additions and 41 deletions

View File

@@ -482,9 +482,9 @@ AT_DATA([input.y],
exp: exp OP exp | NUM;
]])
AT_CHECK([bison -o input.c input.y], 0, [],
AT_CHECK([bison -o input.c input.y], 1, [],
[input.y: conflicts: 1 shift/reduce
input.y: warning: expected 0 shift/reduce conflicts
input.y: expected 0 shift/reduce conflicts
])
AT_CLEANUP
@@ -519,9 +519,9 @@ AT_DATA([input.y],
exp: exp OP exp | NUM;
]])
AT_CHECK([bison -o input.c input.y], 0, [],
AT_CHECK([bison -o input.c input.y], 1, [],
[input.y: conflicts: 1 shift/reduce
input.y: warning: expected 2 shift/reduce conflicts
input.y: expected 2 shift/reduce conflicts
])
AT_CLEANUP
@@ -539,9 +539,9 @@ program: a 'a' | a a;
a: 'a';
]])
AT_CHECK([bison -o input.c input.y], 0, [],
AT_CHECK([bison -o input.c input.y], 1, [],
[input.y: conflicts: 1 reduce/reduce
input.y: warning: expected 0 reduce/reduce conflicts
input.y: expected 0 reduce/reduce conflicts
])
AT_CLEANUP