Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/main/scala/scala/tools/partest/nest/Runner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner) {
* any Windows backslashes with the one true file separator char.
*/
def normalizeLog() {
import scala.util.matching.Regex

// Apply judiciously; there are line comments in the "stub implementations" error output.
val slashes = """[/\\]+""".r
def squashSlashes(s: String) = slashes replaceAllIn (s, "/")
Expand All @@ -324,7 +326,8 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner) {
// no spaces in test file paths below root, because otherwise how to detect end of path string?
val pathFinder = raw"""(?i)\Q${elided}${File.separator}\E([\${File.separator}\S]*)""".r
def canonicalize(s: String): String = (
pathFinder replaceAllIn (s, m => ellipsis + squashSlashes(m group 1))
pathFinder replaceAllIn (s, m =>
Regex.quoteReplacement(ellipsis + squashSlashes(m group 1)))
)

def masters = {
Expand Down