From 0f59e9f34d6ca63db79441e6b8d7d409bd08978e Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Fri, 3 Feb 2017 11:15:47 +0100 Subject: Fix classpaths in dottydoc tests --- doc-tool/test/DottyDocTest.scala | 2 +- doc-tool/test/GenDocs.scala | 4 +++- doc-tool/test/MarkdownTests.scala | 44 +++++++++++++++++++-------------------- 3 files changed, 26 insertions(+), 24 deletions(-) (limited to 'doc-tool') diff --git a/doc-tool/test/DottyDocTest.scala b/doc-tool/test/DottyDocTest.scala index 3f22ec8ec..4202dca73 100644 --- a/doc-tool/test/DottyDocTest.scala +++ b/doc-tool/test/DottyDocTest.scala @@ -24,7 +24,7 @@ trait DottyDocTest { ctx.setProperty(ContextDoc, new ContextDottydoc) ctx.setSetting( ctx.settings.classpath, - "../library/target/scala-2.11/dotty-library_2.11-0.1.1-SNAPSHOT.jar" + dotty.Jars.dottyLib ) base.initialize()(ctx) ctx diff --git a/doc-tool/test/GenDocs.scala b/doc-tool/test/GenDocs.scala index edd05acc2..942347975 100644 --- a/doc-tool/test/GenDocs.scala +++ b/doc-tool/test/GenDocs.scala @@ -11,6 +11,7 @@ object Files { trait LocalResources extends DocDriver { import Files._ + import dotty.Jars def getFiles(file: JFile): Array[JFile] = if (file.isDirectory) file.listFiles.flatMap(getFiles) @@ -21,7 +22,8 @@ trait LocalResources extends DocDriver { "-siteroot" +: "../docs" +: "-project" +: "Dotty" +: "-language:Scala2" +: - "-classpath" +: "../library/target/scala-2.11/dotty-library_2.11-0.1-SNAPSHOT.jar:../interfaces/target/dotty-interfaces-0.1-SNAPSHOT.jar" +: + "-classpath" +: + (Jars.dottyLib + ":" + Jars.dottyInterfaces) +: files } diff --git a/doc-tool/test/MarkdownTests.scala b/doc-tool/test/MarkdownTests.scala index 144acbdfb..6ac7a3a4e 100644 --- a/doc-tool/test/MarkdownTests.scala +++ b/doc-tool/test/MarkdownTests.scala @@ -22,7 +22,7 @@ class MarkdownTests extends DottyDocTest { ctx.setProperty(ContextDoc, new ContextDottydoc) ctx.setSetting( ctx.settings.classpath, - "../library/target/scala-2.11/dotty-library_2.11-0.1-SNAPSHOT.jar" + dotty.Jars.dottyLib ) base.initialize()(ctx) ctx @@ -122,9 +122,9 @@ class MarkdownTests extends DottyDocTest { |package scala | |/** - Item1 - | * - Item2 - | * - Item3 - | */ + | * - Item2 + | * - Item3 + | */ |trait HelloWorld | |trait None @@ -153,11 +153,11 @@ class MarkdownTests extends DottyDocTest { |package scala | |/** - Item1 - | * - Item1a - | * - Item1b - | * - Item2 - | * - Item3 - | */ + | * - Item1a + | * - Item1b + | * - Item2 + | * - Item3 + | */ |trait HelloWorld | |trait None @@ -191,9 +191,9 @@ class MarkdownTests extends DottyDocTest { |package scala | |/** ```scala - | * val x = 1 + 5 - | * ``` - | */ + | * val x = 1 + 5 + | * ``` + | */ |trait HelloWorld | |trait None @@ -250,12 +250,12 @@ class MarkdownTests extends DottyDocTest { |package scala | |/** This - | * ==== - | * is a short text [that](http://google.com) should not be more than a - | * `few` lines long. This text *should* be shortened somewhere that is - | * appropriate for the **ui**. Might be here, or there or somewhere - | * else. - | */ + | * ==== + | * is a short text [that](http://google.com) should not be more than a + | * `few` lines long. This text *should* be shortened somewhere that is + | * appropriate for the **ui**. Might be here, or there or somewhere + | * else. + | */ |trait HelloWorld """.stripMargin @@ -282,10 +282,10 @@ class MarkdownTests extends DottyDocTest { |package scala | |/** This - | * ==== - | * should quit before ![alt text](https://whatever.com/1.png "Img Text"), - | * I shouldn't be visible. - | */ + | * ==== + | * should quit before ![alt text](https://whatever.com/1.png "Img Text"), + | * I shouldn't be visible. + | */ |trait HelloWorld """.stripMargin -- cgit v1.2.3