mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 16:53:02 +00:00
tests: use perl for printing special sequences to files.
And skip tests if perl is not available. This is better than
playing tricks with shell portability. Suggested by Akim
Demaille.
* tests/input.at (Bad escapes in literals): Use it here for special
characters.
(cherry picked from commit b70c7fb4e1)
Conflicts:
tests/input.at
This commit is contained in:
@@ -953,7 +953,13 @@ start: '\777' '\0' '\xfff' '\x0'
|
||||
'\uffff' '\u0000' '\Uffffffff' '\U00000000'
|
||||
'\ ' '\A';
|
||||
]])
|
||||
echo 'start: "\T\F\0\1" ;' | tr 'TF01' '\011\014\0\1' >> input.y
|
||||
|
||||
# It is not easy to create special characters, we cannot even trust tr.
|
||||
# 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 \
|
||||
|| exit 77]])
|
||||
|
||||
AT_BISON_CHECK([input.y], [1], [],
|
||||
[[input.y:2.9-12: invalid number after \-escape: 777
|
||||
|
||||
Reference in New Issue
Block a user