Fix tests failure due to CRLF mismatch on Windows in java.hints, java.source.base#7910
Merged
mbien merged 1 commit intoapache:masterfrom Oct 29, 2024
Merged
Conversation
mbien
reviewed
Oct 26, 2024
...ava.hints/test/unit/src/org/netbeans/modules/java/hints/infrastructure/TreeRuleTestBase.java
Outdated
Show resolved
Hide resolved
...e.base/test/unit/src/org/netbeans/modules/java/source/indexing/VanillaCompileWorkerTest.java
Outdated
Show resolved
Hide resolved
….source.base
Fixed tests failures in the modules java.hints and java.source.base on
Windows due to CRLF-LF mismatches between the expected and actual
outputs.
1. *VanillaCompileWorkerTest.java*:
- transform `System.lineSeparator()` to LF on the actual outputs.
2. *TreeRuleTestBase.java*:
- change the "ignore whitespace" transformation of the actual output
to use `\\s+` instead of only tabs and LFs.
3. *.gitattributes*:
- Mark all test golden files i.e. expected outputs, in the
java.hints module to have only LF line endings.
- This aids tests extending *TreeRuleTestBase*
- Thanks to @mbien for guidance on this.
Signed-off-by: Siddharth Srinivasan <siddharth.srinivasan@oracle.com>
803dba7 to
f7fe71f
Compare
Achal1607
pushed a commit
to Achal1607/netbeans
that referenced
this pull request
Feb 21, 2025
1. Adding the patch for netbeans PR apache#7910 to prevent tests failures due to CRLF line endings. 2. Added the use of the extension configuration prefix "jdk" in ServerTest, as had been done for java.lsp.server/ AttachConfigurations.java and ProjectConfigurationCompletion.java, via the patch/rename-debugger.diff. Signed-off-by: Siddharth Srinivasan <siddharth.srinivasan@oracle.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed tests failures in the modules java.hints and java.source.base on Windows due to CRLF-LF mismatches between the expected and actual outputs.
System.lineSeparator()to LF on the actual outputs.\\s+instead of only tabs and LFs.