]> git.saurik.com Git - bison.git/commitdiff
(%expect with reduce conflicts): New test.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 26 Dec 2002 22:21:23 +0000 (22:21 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 26 Dec 2002 22:21:23 +0000 (22:21 +0000)
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