@@ -23,26 +23,26 @@ class BaseHtmlTest:
23
23
withGeneratedDoc(Seq (" site" ), docsRoot = Some (base.toAbsolutePath.toString))(op)
24
24
25
25
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))
45
43
44
+ finally IO .delete(dest)
45
+ end withGeneratedDoc
46
46
class DocumentContext (d : Document , path : Path ):
47
47
import collection .JavaConverters ._
48
48
0 commit comments