Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling for unknown JUnit segment types (#128)
Necessary to get sbt-jupiter-interface working with Kotlin's Kotest com-lihaoyi/mill#4048 Rather than skipping the entire unknown segment types, we filter out `"suite"` segments explicitly (which appears to be what we actually need to do, e.g. in https://github.com/sbt/sbt-jupiter-interface/blob/43918484453f25ae8e852fae48d54d84be77e0fe/src/library/src/main/java/com/github/sbt/junit/jupiter/internal/event/TaskName.java#L123) and leave unknown segment types as space-separated. We perform a final `.trim` on the generated string to ensure any leading spaces are removed, since when generating the strings for each segment we do not know whether it will be the leading segment or not This appears to have been broken in https://github.com/sbt/sbt-jupiter-interface/pull/126/files, where returning `null` caused the entire test identifier to not render It's not entirely clear to me why we filter out the `suite` segments to begin with, but given that we do this seems like the better way to do it
- Loading branch information