summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <demaille@gostai.com>2009-08-26 11:53:18 +0200
committerAkim Demaille <demaille@gostai.com>2009-08-26 13:21:18 +0200
commit3bed3a757fef03bb063e210ed74918bb875fe2e1 (patch)
treea7965112f8d31ad98443f902ef9a18a048652a7f
parentaa0cb40d61cda5bfa9d325a45735439cbbd06327 (diff)
downloadbison-3bed3a757fef03bb063e210ed74918bb875fe2e1.tar.gz
tests: portability fix.
* tests/input.at (Bad escapes in literals): Don't expect "echo '\0'" to output \ then 0.
-rw-r--r--ChangeLog6
-rw-r--r--tests/input.at9
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 89f863f7..40df1d40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-26 Akim Demaille <demaille@gostai.com>
+
+ tests: portability fix.
+ * tests/input.at (Bad escapes in literals): Don't expect "echo
+ '\0'" to output \ then 0.
+
2009-08-26 Joel E. Denny <jdenny@clemson.edu>
Actually handle the yytable zero value correctly this time.
diff --git a/tests/input.at b/tests/input.at
index f91c0fb8..36a6d408 100644
--- a/tests/input.at
+++ b/tests/input.at
@@ -1233,7 +1233,14 @@ 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 can only 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.
+#
+# Z for 0, O for 1.
+echo 'start: "\T\F\Z\O" ;' | tr 'TFZO' '\011\014\0\1' >> input.y
AT_BISON_CHECK([input.y], [1], [],
[[input.y:2.9-12: invalid number after \-escape: 777