sid-srini commented on code in PR #7910:
URL: https://github.com/apache/netbeans/pull/7910#discussion_r1818126546
##########
java/java.source.base/test/unit/src/org/netbeans/modules/java/source/indexing/VanillaCompileWorkerTest.java:
##########
@@ -685,6 +685,7 @@ public void testPreserveValidMethods1() throws Exception {
" System.err.println(\"Hello, world!\");\n" +
" }\n" +
"}");
+ file2Fixed.replaceAll((k, v) -> v.replaceAll("\r\n", "\n"));
assertEquals(expected, file2Fixed);
Review Comment:
Actually my mention on the `git config` adjustments pertains to the other
file *java/hints/infrastructure/TreeRuleTestBase.java*, not this file
*java/source/indexing/VanillaCompileWorkerTest.java*.
1. In the latter, i.e. *VanillaCompileWorkerTest*:
1. Only the ***actual*** output in `file2Fixed` is being processed to
convert `\r\n` → `\n`.
2. The `expected` string is **not** changed.
3. The possible reason why the generated output has `\r\n` in it is that
on Windows, the module generates code with CRLF by default.
2. Regarding `git config`:
1. Thank you for including the `.gitattributes` in the discussion.
2. I checked it now and found that the *goldenfiles* in this package are
named with the extension `.pass`, in addition to `.java`.
3. That is why the `git config` command was noted as a workaround
alternative.
4. I don't know if *.pass* files in other locations have different CRLF
requirements.
5. Please let me know if I should go ahead and include the following
change to the *.gitattributes* file to set as binary (instead of `text
eol=lf`):
- `*.pass binary`
6. However, there may be other places where *TreeRuleTestBase* could be
extended in the future and the goldenfiles end up being named differently.
7. Finally, if the SCM is changed, or a zip of the source is used, then
would the code change in *TreeRuleTestBase.java* not still be needed?
Please let me know what you think. Thank you very much.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists