]> git.saurik.com Git - bison.git/blobdiff - tests/conflicts.at
(%expect with reduce conflicts): New test.
[bison.git] / tests / conflicts.at
index 58838e7e2986184d99ac12da3aea879bec96dd17..ec9847aaf583636f5fe4d1a3fefb2289a9c05dec 100644 (file)
@@ -527,3 +527,23 @@ AT_CHECK([bison -o input.c input.y], 1, [],
 input.y: expected 2 shift/reduce conflicts
 ])
 AT_CLEANUP
+
+
+## ------------------------------ ##
+## %expect with reduce conflicts  ##
+## ------------------------------ ##
+
+AT_SETUP([%expect with reduce conflicts])
+
+AT_DATA([input.y],
+[[%expect 0
+%%
+program: a 'a' | a a;
+a: 'a';
+]])
+
+AT_CHECK([bison -o input.c input.y], 1, [],
+[input.y: warning: 1 reduce/reduce conflict
+input.y: expected 0 reduce/reduce conflicts
+])
+AT_CLEANUP