Saravanakumar Selvaraj created CAMEL-27424:
----------------------------------------------
Summary: camel-groovy: two test follow-ups from the reviews of
CAMEL-27401 and CAMEL-27408
Key: CAMEL-27424
URL: https://issues.apache.org/jira/browse/CAMEL-27424
Project: Camel
Issue Type: Test
Components: camel-groovy, tests
Reporter: Saravanakumar Selvaraj
The reviews of https://github.com/apache/camel/pull/30621 and
https://github.com/apache/camel/pull/30622 each made one optional proposal.
1. testValidateExpressionIndexWithLfAndCrLf of GroovyLanguageTest checks
scripts with LF, CRLF and mixed line ends. The review proposes one more script,
with CR line ends only. Groovy 5.1.3 counts a new line only after LF. So it
reports the syntax error of that script in line 1. The method before
CAMEL-27401 gives the right index for it too. So the case guards the rule that
the fix relies on.
2. testMarshalDOM of GroovyXmlDataFormatTest replaces System.lineSeparator()
with LF before its comparison. The review proposes to replace CRLF itself, so
that the line does not depend on the platform. On Windows and on Linux the
result is the same.
Proposed change: add the script to the test of point 1, and change the line of
point 2. Only the two tests change.
Checked on main at ac040fa685 with the Groovy 5.1.3 jar. The CR script gives
line 1, column 24, and the index 23.
_Claude Code on behalf of saravanakumar1987_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)