]> git.saurik.com Git - bison.git/blobdiff - tests/input.at
diagnostics: revamp the handling of -Werror
[bison.git] / tests / input.at
index 4d7308c107d6b86331b3b0dd054eea5d6e7f6d45..382532c60091d4bc372fc67435fabc6d672561bd 100644 (file)
@@ -20,6 +20,29 @@ AT_BANNER([[Input Processing.]])
 # Mostly test that we are robust to mistakes.
 
 
+## ----------------- ##
+## Invalid options.  ##
+## ----------------- ##
+
+AT_SETUP([Invalid options])
+
+AT_DATA([input.y],
+[[%%
+exp: '0'
+]])
+
+# We used to accept these, as -f, --report and others were sharing
+# their code with -W.
+AT_BISON_CHECK([-ferror=caret input.y], [1], [], [ignore])
+AT_BISON_CHECK([--report=error=itemsets input.y], [1], [], [ignore])
+
+# We used to accept any character after "-Werror", instead of ensuring
+# this is "=".
+AT_BISON_CHECK([-Werror?all input.y], [1], [], [ignore])
+
+AT_CLEANUP
+
+
 ## ---------------- ##
 ## Invalid inputs.  ##
 ## ---------------- ##