X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/88bce5a2ef15e5b508749e75ddad709aca85b019..c8f002c7d3407d5c91a5882466916160a72aa8c4:/tests/conflicts.at diff --git a/tests/conflicts.at b/tests/conflicts.at index 84b4fcda..6f0a971f 100644 --- a/tests/conflicts.at +++ b/tests/conflicts.at @@ -37,7 +37,9 @@ exp: e 'e'; e: 'e' | /* Nothing. */; ]]) -AT_CHECK([bison input.y -o input.c]) +AT_CHECK([bison input.y -o input.c], 0, [], +[[input.y:4.8: warning: rule never reduced because of conflicts: e: /* empty */ +]]) AT_CLEANUP @@ -140,7 +142,7 @@ exp: exp OP exp | NUM; ]]) AT_CHECK([bison input.y -o input.c --report=all], 0, [], -[input.y contains 1 shift/reduce conflict. +[input.y: warning: 1 shift/reduce conflict ]) # Check the contents of the report. @@ -203,7 +205,7 @@ state 3 0 $accept: exp $end . - $default accept + $default accept state 4 @@ -306,7 +308,7 @@ state 3 0 $accept: exp $end . - $default accept + $default accept state 4 @@ -369,12 +371,18 @@ id : '0'; ]]) AT_CHECK([bison input.y -o input.c --report=all], 0, [], -[input.y contains 1 reduce/reduce conflict. -]) +[[input.y: warning: 1 reduce/reduce conflict +input.y:4.4-8: warning: rule never reduced because of conflicts: id: '0' +]]) # Check the contents of the report. AT_CHECK([cat input.output], [], -[[State 1 contains 1 reduce/reduce conflict. +[[Rules never reduced + + 4 id: '0' + + +State 1 contains 1 reduce/reduce conflict. Grammar @@ -458,7 +466,7 @@ state 5 0 $accept: exp $end . - $default accept + $default accept ]]) AT_CLEANUP @@ -480,8 +488,8 @@ exp: exp OP exp | NUM; ]]) AT_CHECK([bison input.y -o input.c], 1, [], -[input.y contains 1 shift/reduce conflict. -expected 0 shift/reduce conflicts +[input.y: warning: 1 shift/reduce conflict +input.y: expected 0 shift/reduce conflicts ]) AT_CLEANUP @@ -517,7 +525,7 @@ exp: exp OP exp | NUM; ]]) AT_CHECK([bison input.y -o input.c], 1, [], -[input.y contains 1 shift/reduce conflict. -expected 2 shift/reduce conflicts +[input.y: warning: 1 shift/reduce conflict +input.y: expected 2 shift/reduce conflicts ]) AT_CLEANUP