[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [platform-testers] Bison 3.5.92 on AIX
From: |
Akim Demaille |
Subject: |
Re: [platform-testers] Bison 3.5.92 on AIX |
Date: |
Sun, 3 May 2020 18:11:30 +0200 |
> Le 3 mai 2020 à 17:25, Bruno Haible <address@hidden> a écrit :
>
> On AIX 7.1, with xlc in 32-bit mode, the build works fine, but there is a
> test failure:
>
> FAIL: examples/c/bistromathic/bistromathic.test
>
> Find the test-suite.log attached.
test-suite.log
Description: Binary data
Thanks Bruno, I'm installing this.
commit 38a82878136a8e10179f9545c15ffcf2bea1c50a
Author: Akim Demaille <address@hidden>
Date: Sun May 3 17:59:13 2020 +0200
bistromathic: beware of portability issues of readline on AIX
Readline may emit escape sequences before the prompt.
Reported by Bruno Haible.
https://lists.gnu.org/r/platform-testers/2020-05/msg00001.html.
* examples/c/bistromathic/bistromathic.test: Trust readline _only_ if
we get what we expect on some reference computation.
diff --git a/examples/c/bistromathic/bistromathic.test
b/examples/c/bistromathic/bistromathic.test
index dfefa804..d33b4e8f 100755
--- a/examples/c/bistromathic/bistromathic.test
+++ b/examples/c/bistromathic/bistromathic.test
@@ -28,12 +28,24 @@
#
# On OpenBSD 6.5 the prompt is displayed, but the input is not
# repeated (!). So input "1+2*3\n" gives "> 7\n> \n" as output.
+#
+# On AIX, you get some escaping sequence before the prompt:
+# "<ESC>[?1034h> 1+2*3". It appears to pass the terminfo capability
+# "smm", to put the terminal in "meta mode": as if the user had hit
+# META.
+
+echo >perfect '> 0
+0
+> '
+
+echo >ok '0'
+echo '0' | prog >effective
-if ! echo '1-1' | prog | grep '>' >/dev/null; then
- # macOS.
+if diff perfect effective >/dev/null 2>&1; then
+ # Alles ist gut.
+elif diff ok effective >/dev/null 2>&1; then
strip_prompt=true
-elif ! echo '1-1' | prog | grep '1-1' >/dev/null; then
- # OpenBSD 6.5. I don't want to spend time on this.
+else
echo "SKIP: this is not the GNU Readline we expect"
exit 77
fi