bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests: portability fix.


From: Akim Demaille
Subject: [PATCH] tests: portability fix.
Date: Wed, 26 Aug 2009 13:24:49 +0200

Installed in master and branch-2.5.

        * tests/input.at (Bad escapes in literals): Don't expect "echo
        '\0'" to output \ then 0.
---
 ChangeLog      |    6 ++++++
 tests/input.at |    9 ++++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 89f863f..40df1d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-26  Akim Demaille  <address@hidden>
+
+       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  <address@hidden>

        Actually handle the yytable zero value correctly this time.
diff --git a/tests/input.at b/tests/input.at
index f91c0fb..36a6d40 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
--
1.6.4


Attachment: 0001-tests-portability-fix.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]