Skip to content

Commit 36d1798

Browse files
committed
Apply requested changes
1 parent f5fd510 commit 36d1798

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

scaladoc/test/dotty/tools/scaladoc/BaseHtmlTest.scala

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,26 @@ class BaseHtmlTest:
2323
withGeneratedDoc(Seq("site"), docsRoot = Some(base.toAbsolutePath.toString))(op)
2424

2525
def withGeneratedDoc(
26-
pcks: Seq[String],
27-
docsRoot: Option[String] = None,
28-
customArgs: Option[Scaladoc.Args] = None,
29-
)(
30-
op: ProjectContext ?=> Unit,
31-
): Unit =
32-
val dest = customArgs.map(_.output).getOrElse(Files.createTempDirectory("test-doc").toFile)
33-
try
34-
val args = customArgs.getOrElse(Scaladoc.Args(
35-
name = projectName,
36-
tastyFiles = pcks.flatMap(tastyFiles(_)),
37-
output = dest,
38-
docsRoot = docsRoot,
39-
projectVersion = Some(projectVersion)
40-
))
41-
Scaladoc.run(args)(using testContext)
42-
op(using ProjectContext(args.output.toPath))
43-
44-
finally IO.delete(dest)
26+
pcks: Seq[String],
27+
docsRoot: Option[String] = None,
28+
customArgs: Option[Scaladoc.Args] = None,
29+
)(
30+
op: ProjectContext ?=> Unit,
31+
): Unit =
32+
val dest = customArgs.fold(Files.createTempDirectory("test-doc").toFile)(_.output)
33+
try
34+
val args = customArgs.getOrElse(Scaladoc.Args(
35+
name = projectName,
36+
tastyFiles = pcks.flatMap(tastyFiles(_)),
37+
output = dest,
38+
docsRoot = docsRoot,
39+
projectVersion = Some(projectVersion)
40+
))
41+
Scaladoc.run(args)(using testContext)
42+
op(using ProjectContext(args.output.toPath))
4543

44+
finally IO.delete(dest)
45+
end withGeneratedDoc
4646
class DocumentContext(d: Document, path: Path):
4747
import collection.JavaConverters._
4848

scaladoc/test/dotty/tools/scaladoc/site/IndexPagesTest.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class IndexPagesTest extends BaseHtmlTest:
3333
def NOstaticSiteAndNOApiSubdirectory = gridTest(baseArgs.copy(docsRoot = None, apiSubdirectory = false))
3434

3535
private def gridTest(args: Scaladoc.Args) = withGeneratedDoc(Seq.empty, None, customArgs = Some(args)) {
36-
println(args.output)
3736
withHtmlFile("index.html") { content =>
3837
content.fileExists
3938
}

0 commit comments

Comments
 (0)