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.
This commit is contained in:
Bruno Haible
2025-08-09 12:57:33 +02:00
committed by Paul Eggert
parent 5d2c34b48c
commit c1144a5076
2 changed files with 5 additions and 1 deletions

View File

@@ -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@'}

View File

@@ -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])