Skip to content

Commit 2a2f314

Browse files
Martijn HoekstraMartijn Hoekstra
Martijn Hoekstra
authored and
Martijn Hoekstra
committed
normalize paths for tests
1 parent 75f4400 commit 2a2f314

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

test/test/CompilerTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,7 @@ abstract class CompilerTest {
452452
processFileDir(sourceFile, { sf =>
453453
if (extensionsToCopy.contains(sf.extension)) {
454454
dest.parent.jfile.mkdirs
455-
dest.toFile.writeAll("/* !!!!! WARNING: DO NOT MODIFY. Original is at: $sf !!!!! */",
456-
sf.slurp())
455+
dest.toFile.writeAll(s"/* !!!!! WARNING: DO NOT MODIFY. Original is at: $sf !!!!! */", sf.slurp)
457456
} else {
458457
log(s"WARNING: ignoring $sf")
459458
}

test/test/InterfaceEntryPointTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import scala.collection.mutable.ListBuffer
1818
*/
1919
class InterfaceEntryPointTest {
2020
@Test def runCompilerFromInterface = {
21-
val sources = List("./tests/pos/HelloWorld.scala")
21+
val sources = List("./tests/pos/HelloWorld.scala").map(p => new java.io.File(p).getPath())
2222
val args = sources ++ List("-d", "./out/")
2323

2424
val mainClass = Class.forName("dotty.tools.dotc.Main")

test/test/OtherEntryPointsTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import scala.collection.mutable.ListBuffer
1717
*/
1818
class OtherEntryPointsTest {
1919
@Test def runCompiler = {
20-
val sources = List("./tests/pos/HelloWorld.scala")
20+
val sources = List("./tests/pos/HelloWorld.scala").map(p => new java.io.File(p).getPath())
2121
val args = sources ++ List("-d", "./out/")
2222

2323
val reporter = new CustomReporter
@@ -31,7 +31,7 @@ class OtherEntryPointsTest {
3131
}
3232

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

3737
val reporter = new CustomReporter

0 commit comments

Comments
 (0)