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
b70c7fb4e1db54e78d4f3d4a0f110a81118ffc60)
Conflicts:
tests/input.at
+2009-08-27 Joel E. Denny <jdenny@clemson.edu>
+
+ 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 character literals): Use it here for
+ omitting final newlines.
+ (Bad escapes in literals): Use it here for special characters.
+
2009-08-21 Joel E. Denny <jdenny@clemson.edu>
Use locale when quoting.
'\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