X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/fc5734fe23f35e5ce15f6b9c550115fb69113ea2..1bfb97dba532a32dbeffddd378955055b9277303:/tests/reduce.at diff --git a/tests/reduce.at b/tests/reduce.at index 7dc939ed..4c8da723 100644 --- a/tests/reduce.at +++ b/tests/reduce.at @@ -332,3 +332,24 @@ Useless rules ]]) AT_CLEANUP + + + +## ---------------- ## +## Empty Language. ## +## ---------------- ## + +AT_SETUP([Empty Language]) + +AT_DATA([[input.y]], +[[%output="input.c" +%% +exp: exp; +]]) + +AT_CHECK([[bison input.y]], 1, [], +[[input.y: warning: 2 useless nonterminals and 2 useless rules +input.y:3.1-3: fatal error: start symbol exp does not derive any sentence +]]) + +AT_CLEANUP