Skip to content

Commit

Permalink
WIP DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
MaciejG604 committed Nov 29, 2023
1 parent c4447b3 commit 40d1ffe
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2101,11 +2101,13 @@ abstract class RunTestDefinitions(val scalaVersionOpt: Option[String])
val input = "script.sc"
TestInputs(os.rel / input -> s"println(\"$msg\")")
.fromRoot { root =>
expect(!os.isDir(root / getCoursierCacheRelPath))
val res = os.proc(customCall, "run", extraOptions, "--server=false", input)
.call(
cwd = root,
stderr = os.Pipe
)
pprint.err.log(os.list(root))
expect(res.out.trim() == msg)
expect(
res.err.trim().contains(
Expand All @@ -2124,15 +2126,17 @@ abstract class RunTestDefinitions(val scalaVersionOpt: Option[String])
.fromRoot { root =>
val newHomePath = root / "home"
os.makeDir(newHomePath)
expect(!os.isDir(newHomePath / "Library" / "Caches" / "Coursier"))
expect(!os.isDir(newHomePath / getCoursierCacheRelPath))
val extraEnv = Map("SCALA_CLI_HOME_DIR_OVERRIDE" -> newHomePath.toString())
pprint.err.log(extraEnv)

val res = os.proc(TestUtil.cli, "run", extraOptions, "--server=false", input)
val res = os.proc(TestUtil.cli, "run", extraOptions, "--server=false", input, "--command")
.call(
cwd = root,
stderr = os.Pipe,
env = extraEnv
)
pprint.err.log(os.walk(newHomePath, maxDepth = 4))
expect(res.out.trim() == msg)
expect(
res.err.trim().contains(
Expand Down

0 comments on commit 40d1ffe

Please sign in to comment.