From aef9f96d670f7f7a0a40a85575c96319052f4707 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Tue, 26 Dec 2017 00:50:49 -0800 Subject: Fix `HelloWorldTests.scala` --- .../src/test/scala/mill/scalaplugin/HelloWorldTests.scala | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'scalaplugin') diff --git a/scalaplugin/src/test/scala/mill/scalaplugin/HelloWorldTests.scala b/scalaplugin/src/test/scala/mill/scalaplugin/HelloWorldTests.scala index 2ada6463..a0b60e1e 100644 --- a/scalaplugin/src/test/scala/mill/scalaplugin/HelloWorldTests.scala +++ b/scalaplugin/src/test/scala/mill/scalaplugin/HelloWorldTests.scala @@ -54,7 +54,6 @@ object HelloWorldTests extends TestSuite { val srcPath = pwd / 'scalaplugin / 'src / 'test / 'resource / "hello-world" val workspacePath = pwd / 'target / 'workspace / "hello-world" - val outputPath = workspacePath / 'out val mainObject = workspacePath / 'src / 'main / 'scala / "Main.scala" def eval[T](t: Task[T], mapping: Discovered.Mapping[_]) = { @@ -122,9 +121,9 @@ object HelloWorldTests extends TestSuite { val analysisFile = result.analysisFile val outputFiles = ls.rec(outPath) val expectedClassfiles = - compileClassfiles(outputPath / 'compile / 'classes) + compileClassfiles(workspacePath / 'compile / 'classes) assert( - outPath == outputPath / 'compile / 'classes, + outPath == workspacePath / 'compile / 'classes, exists(analysisFile), outputFiles.nonEmpty, outputFiles.forall(expectedClassfiles.contains), @@ -156,7 +155,7 @@ object HelloWorldTests extends TestSuite { assert(err.isInstanceOf[CompileFailed]) val (compilePath, compileMetadataPath) = - Evaluator.resolveDestPaths(outputPath, helloWorldMapping.value(HelloWorld.compile)) + Evaluator.resolveDestPaths(workspacePath, helloWorldMapping.value(HelloWorld.compile)) assert( ls.rec(compilePath / 'classes).isEmpty, @@ -236,7 +235,7 @@ object HelloWorldTests extends TestSuite { evalCount > 0 ) - val unJarPath = outputPath / 'unjar + val unJarPath = workspacePath / 'unjar mkdir(unJarPath) %("tar", "xf", result.path, "-C", unJarPath) @@ -272,7 +271,7 @@ object HelloWorldTests extends TestSuite { 'logOutputToFile { eval(HelloWorld.compile, helloWorldMapping) - val logFile = outputPath / "compile.log" + val logFile = workspacePath / "compile.log" assert(exists(logFile)) } } -- cgit v1.2.3