sid-srini commented on code in PR #7910:
URL: https://github.com/apache/netbeans/pull/7910#discussion_r1818308581


##########
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:
   Thank you very much. 
   
   I have tested and pushed the commit with the *.gitattributes* set to mark 
`eol=lf` only for all files in the *goldenfiles* directory of the 
*java/java.hints* module unit-tests.
   - This takes care of not requiring modification of the golden files during 
test assertions.
   
   The patch still requires the changes to the actual output 
`System.lineSeparator()` is not LF:
   1. *VanillaCompileWorkerTest*: replace `System.lineSeparator()` to `\n`
   2. *TreeRuleTestBase*: fixed regex `[ \t\n]+` → `\\s+`
   



-- 
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

Reply via email to