Skip to content

some fixes for windows test failures #1493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions test/test/CompilerTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,7 @@ abstract class CompilerTest {
processFileDir(sourceFile, { sf =>
if (extensionsToCopy.contains(sf.extension)) {
dest.parent.jfile.mkdirs
dest.toFile.writeAll("/* !!!!! WARNING: DO NOT MODIFY. Original is at: $sf !!!!! */",
sf.slurp())
dest.toFile.writeAll(s"/* !!!!! WARNING: DO NOT MODIFY. Original is at: $sf !!!!! */", sf.slurp)
} else {
log(s"WARNING: ignoring $sf")
}
Expand Down
2 changes: 1 addition & 1 deletion test/test/InterfaceEntryPointTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import scala.collection.mutable.ListBuffer
*/
class InterfaceEntryPointTest {
@Test def runCompilerFromInterface = {
val sources = List("./tests/pos/HelloWorld.scala")
val sources = List("./tests/pos/HelloWorld.scala").map(p => new java.io.File(p).getPath())
val args = sources ++ List("-d", "./out/")

val mainClass = Class.forName("dotty.tools.dotc.Main")
Expand Down
4 changes: 2 additions & 2 deletions test/test/OtherEntryPointsTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import scala.collection.mutable.ListBuffer
*/
class OtherEntryPointsTest {
@Test def runCompiler = {
val sources = List("./tests/pos/HelloWorld.scala")
val sources = List("./tests/pos/HelloWorld.scala").map(p => new java.io.File(p).getPath())
val args = sources ++ List("-d", "./out/")

val reporter = new CustomReporter
Expand All @@ -31,7 +31,7 @@ class OtherEntryPointsTest {
}

@Test def runCompilerWithContext = {
val sources = List("./tests/pos/HelloWorld.scala")
val sources = List("./tests/pos/HelloWorld.scala").map(p => new java.io.File(p).getPath())
val args = sources ++ List("-d", "./out/")

val reporter = new CustomReporter
Expand Down
4 changes: 2 additions & 2 deletions test/test/TestREPL.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TestREPL(script: String) extends REPL {
while (lines.hasNext && lines.head.startsWith(continuationPrompt)) {
val continued = lines.next
output.println(continued)
buf append "\n"
buf append System.lineSeparator()
buf append continued.drop(continuationPrompt.length)
}
buf.toString
Expand All @@ -49,7 +49,7 @@ class TestREPL(script: String) extends REPL {
out.close()
val printed = out.toString
val transcript = printed.drop(printed.indexOf(config.prompt))
if (transcript.toString != script) {
if (transcript.toString.lines.toList != script.lines.toList) {
println("input differs from transcript:")
println(transcript)
assert(false)
Expand Down