From c1144a50764215755d7ee2bf4e6b584757d23d10 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 9 Aug 2025 12:57:33 +0200 Subject: [PATCH] tests: Fix test failures of Java tests on Cygwin. Fix suggested by Paul Eggert. * tests/atlocal.in (lf): New variable. * tests/local.at (AT_JAVA_PARSER_CHECK): Pass a Windows-agnostic value of line.separator to the Java runtime. --- tests/atlocal.in | 4 ++++ tests/local.at | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/atlocal.in b/tests/atlocal.in index 0d388d0b..76a5f360 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -104,6 +104,10 @@ fi # Empty if no Java VM was found : ${CONF_JAVA='@CONF_JAVA@'} +# An initialization for Java tests. +lf=' +' + # We need egrep and perl. : ${EGREP='@EGREP@'} : ${PERL='@PERL@'} diff --git a/tests/local.at b/tests/local.at index ee542f9e..a3601bd6 100644 --- a/tests/local.at +++ b/tests/local.at @@ -1599,7 +1599,7 @@ AT_CHECK([sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr], # AT_JAVA_PARSER_CHECK(COMMAND, EXIT-STATUS, EXPOUT, EXPERR, [PRE]) # ----------------------------------------------------------------- m4_define([AT_JAVA_PARSER_CHECK], -[AT_CHECK([$5[ $SHELL ../../../javaexec.sh ]$1], [$2], [$3], [$4])]) +[AT_CHECK([$5[ $SHELL ../../../javaexec.sh -Dline.separator="$lf" ]$1], [$2], [$3], [$4])]) # AT_PARSER_CHECK(COMMAND, EXIT-STATUS, EXPOUT, EXPERR, [PRE])