X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/11b192127cac086338bfaa43f3bab3acda8e3a20..2a6b66c5fd063c8868f239a78ecfb11c899fd22c:/tests/input.at?ds=sidebyside diff --git a/tests/input.at b/tests/input.at index 5bb707e7..736ee252 100644 --- a/tests/input.at +++ b/tests/input.at @@ -751,9 +751,9 @@ without_period: "WITHOUT.PERIOD"; AT_BISON_OPTION_POPDEFS # POSIX Yacc accept periods, but not dashes. -AT_BISON_CHECK([--yacc input.y], [1], [], -[[input.y:9.8-16: POSIX Yacc forbids dashes in symbol names: WITH-DASH [-Wyacc] -input.y:18.8-16: POSIX Yacc forbids dashes in symbol names: with-dash [-Wyacc] +AT_BISON_CHECK([--yacc -Wno-error input.y], [], [], +[[input.y:9.8-16: warning: POSIX Yacc forbids dashes in symbol names: WITH-DASH [-Wyacc] +input.y:18.8-16: warning: POSIX Yacc forbids dashes in symbol names: with-dash [-Wyacc] ]]) # So warn about them. @@ -805,9 +805,9 @@ start: DECIMAL_1 HEXADECIMAL_2; AT_BISON_CHECK([redecl.y], [1], [], [[redecl.y:10.10-22: error: user token number 11259375 redeclaration for HEXADECIMAL_1 -redecl.y:9.8-16: previous declaration for DECIMAL_1 +redecl.y:9.8-16: previous declaration for DECIMAL_1 redecl.y:12.10-18: error: user token number 16702650 redeclaration for DECIMAL_2 -redecl.y:11.10-22: previous declaration for HEXADECIMAL_2 +redecl.y:11.10-22: previous declaration for HEXADECIMAL_2 ]]) AT_DATA_GRAMMAR([too-large.y], @@ -1159,9 +1159,9 @@ start: ; ]]) AT_BISON_CHECK([[input.y]], [1], [], [[input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither' -input.y:1.9-21: error: accepted value: 'pull' -input.y:1.9-21: error: accepted value: 'push' -input.y:1.9-21: error: accepted value: 'both' +input.y:1.9-21: accepted value: 'pull' +input.y:1.9-21: accepted value: 'push' +input.y:1.9-21: accepted value: 'both' ]]) AT_CLEANUP @@ -1183,9 +1183,9 @@ start: ; AT_BISON_CHECK([[input.y]], [1], [], [[input.y:1.9-21: warning: deprecated %define variable name: 'api.push_pull', use 'api.push-pull' [-Wdeprecated] input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither' -input.y:1.9-21: error: accepted value: 'pull' -input.y:1.9-21: error: accepted value: 'push' -input.y:1.9-21: error: accepted value: 'both' +input.y:1.9-21: accepted value: 'pull' +input.y:1.9-21: accepted value: 'push' +input.y:1.9-21: accepted value: 'both' ]]) AT_DATA([[input.y]], @@ -1321,7 +1321,7 @@ AT_DATA([empty.y], start: ''; start: ' ]]) -AT_CHECK([[perl -e "print 'start: \'';" >> empty.y || exit 77]]) +AT_CHECK([[$PERL -e "print 'start: \'';" >> empty.y || exit 77]]) AT_BISON_CHECK([empty.y], [1], [], [[empty.y:2.8-9: warning: empty character literal [-Wother] @@ -1336,7 +1336,7 @@ AT_DATA([two.y], start: 'ab'; start: 'ab ]]) -AT_CHECK([[perl -e "print 'start: \'ab';" >> two.y || exit 77]]) +AT_CHECK([[$PERL -e "print 'start: \'ab';" >> two.y || exit 77]]) AT_BISON_CHECK([two.y], [1], [], [[two.y:2.8-11: warning: extra characters in character literal [-Wother] @@ -1351,7 +1351,7 @@ AT_DATA([three.y], start: 'abc'; start: 'abc ]]) -AT_CHECK([[perl -e "print 'start: \'abc';" >> three.y || exit 77]]) +AT_CHECK([[$PERL -e "print 'start: \'abc';" >> three.y || exit 77]]) AT_BISON_CHECK([three.y], [1], [], [[three.y:2.8-12: warning: extra characters in character literal [-Wother] @@ -1380,7 +1380,7 @@ start: '\777' '\0' '\xfff' '\x0' # Beside we cannot even expect "echo '\0'" to output two characters # (well three with \n): at least Bash 3.2 converts the two-character # sequence "\0" into a single NUL character. -AT_CHECK([[perl -e 'print "start: \"\\\t\\\f\\\0\\\1\" ;";' >> input.y \ +AT_CHECK([[$PERL -e 'print "start: \"\\\t\\\f\\\0\\\1\" ;";' >> input.y \ || exit 77]]) AT_BISON_CHECK([input.y], [1], [], @@ -1460,8 +1460,7 @@ AT_BISON_CHECK([[-Wno-none input.y]], [[0]], [[]], # -Werror is not disabled by -Wnone or equivalent. AT_BISON_CHECK([[-Werror,none,yacc input.y]], [[1]], [[]], [[stderr]]) AT_CHECK([[sed 's/^.*bison:/bison:/' stderr]], [[0]], -[[bison: warnings being treated as errors -input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar [-Wyacc] +[[input.y:2.1-7: error: POSIX Yacc forbids dashes in symbol names: foo-bar [-Werror=yacc] ]]) [mv stderr experr] AT_BISON_CHECK([[-Werror,no-all,yacc input.y]], [[1]], [[]], [[experr]])