Skip to content

Commit 270bd8b

Browse files
authored
Merge pull request #12988 from philwalk/fix-scripts-tests
2 parents 9fc286b + 078d1cb commit 270bd8b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

compiler/test-resources/scripting/showArgs.sc

100644100755
File mode changed.

compiler/test/dotty/tools/scripting/BashScriptsTests.scala

+6-4
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ class BashScriptsTests:
3636

3737
val showArgsScript = testFiles.find(_.getName == "showArgs.sc").get.absPath
3838

39-
val scalacPath = which("scalac")
40-
val scalaPath = which("scala")
39+
val scalacPath = "dist/target/pack/bin/scalac" // which("scalac")
40+
val scalaPath = "dist/target/pack/bin/scala" // which("scala")
4141

4242
/* verify `dist/bin/scalac` */
4343
@Test def verifyScalacArgs =
44+
printf("scalacPath[%s]\n",scalacPath)
4445
val commandline = (Seq(scalacPath, "-script", showArgsScript) ++ testScriptArgs).mkString(" ")
4546
if bashPath.toFile.exists then
4647
var cmd = Array(bashExe, "-c", commandline)
@@ -50,7 +51,7 @@ class BashScriptsTests:
5051
var fail = false
5152
printf("\n")
5253
for (line, expect) <- output zip expectedOutput do
53-
printf("expected: %-17s| actual: %s\n", line, expect)
54+
printf("expected: %-17s\nactual : %s\n", expect, line)
5455
if line != expect then
5556
fail = true
5657

@@ -67,8 +68,9 @@ class BashScriptsTests:
6768
} yield line
6869
var fail = false
6970
printf("\n")
71+
var mismatches = List.empty[(String,String)]
7072
for (line, expect) <- output zip expectedOutput do
71-
printf("expected: %-17s| actual: %s\n", line, expect)
73+
printf("expected: %-17s\nactual : %s\n", expect, line)
7274
if line != expect then
7375
fail = true
7476

0 commit comments

Comments
 (0)