Skip to content

Commit d7812e2

Browse files
committed
Fix classpaths in dottydoc tests
1 parent 8408ac9 commit d7812e2

File tree

3 files changed

+27
-24
lines changed

3 files changed

+27
-24
lines changed

doc-tool/test/DottyDocTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ trait DottyDocTest {
2424
ctx.setProperty(ContextDoc, new ContextDottydoc)
2525
ctx.setSetting(
2626
ctx.settings.classpath,
27-
"../library/target/scala-2.11/dotty-library_2.11-0.1.1-SNAPSHOT.jar"
27+
dotty.Jars.dottyLib
2828
)
2929
base.initialize()(ctx)
3030
ctx

doc-tool/test/GenDocs.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ object Files {
1111

1212
trait LocalResources extends DocDriver {
1313
import Files._
14+
import dotty.Jars
1415

1516
def getFiles(file: JFile): Array[JFile] =
1617
if (file.isDirectory) file.listFiles.flatMap(getFiles)
@@ -21,7 +22,8 @@ trait LocalResources extends DocDriver {
2122
"-siteroot" +: "../docs" +:
2223
"-project" +: "Dotty" +:
2324
"-language:Scala2" +:
24-
"-classpath" +: "../library/target/scala-2.11/dotty-library_2.11-0.1-SNAPSHOT.jar:../interfaces/target/dotty-interfaces-0.1-SNAPSHOT.jar" +:
25+
"-classpath" +:
26+
(Jars.dottyLib + ":" + Jars.dottyInterfaces) +:
2527
files
2628
}
2729

doc-tool/test/MarkdownTests.scala

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import org.junit.Assert._
66

77
import dotc.core.Contexts.{ Context, ContextBase, FreshContext }
88
import dotc.core.Comments.{ ContextDoc, ContextDocstrings }
9+
import java.io.{ File => JFile }
910
import dottydoc.core.ContextDottydoc
1011

1112
class MarkdownTests extends DottyDocTest {
@@ -22,7 +23,7 @@ class MarkdownTests extends DottyDocTest {
2223
ctx.setProperty(ContextDoc, new ContextDottydoc)
2324
ctx.setSetting(
2425
ctx.settings.classpath,
25-
"../library/target/scala-2.11/dotty-library_2.11-0.1-SNAPSHOT.jar"
26+
dotty.Jars.dottyLib
2627
)
2728
base.initialize()(ctx)
2829
ctx
@@ -122,9 +123,9 @@ class MarkdownTests extends DottyDocTest {
122123
|package scala
123124
|
124125
|/** - Item1
125-
| * - Item2
126-
| * - Item3
127-
| */
126+
| * - Item2
127+
| * - Item3
128+
| */
128129
|trait HelloWorld
129130
|
130131
|trait None
@@ -153,11 +154,11 @@ class MarkdownTests extends DottyDocTest {
153154
|package scala
154155
|
155156
|/** - Item1
156-
| * - Item1a
157-
| * - Item1b
158-
| * - Item2
159-
| * - Item3
160-
| */
157+
| * - Item1a
158+
| * - Item1b
159+
| * - Item2
160+
| * - Item3
161+
| */
161162
|trait HelloWorld
162163
|
163164
|trait None
@@ -191,9 +192,9 @@ class MarkdownTests extends DottyDocTest {
191192
|package scala
192193
|
193194
|/** ```scala
194-
| * val x = 1 + 5
195-
| * ```
196-
| */
195+
| * val x = 1 + 5
196+
| * ```
197+
| */
197198
|trait HelloWorld
198199
|
199200
|trait None
@@ -250,12 +251,12 @@ class MarkdownTests extends DottyDocTest {
250251
|package scala
251252
|
252253
|/** This
253-
| * ====
254-
| * is a short text [that](http://google.com) should not be more than a
255-
| * `few` lines long. This text *should* be shortened somewhere that is
256-
| * appropriate for the **ui**. Might be here, or there or somewhere
257-
| * else.
258-
| */
254+
| * ====
255+
| * is a short text [that](http://google.com) should not be more than a
256+
| * `few` lines long. This text *should* be shortened somewhere that is
257+
| * appropriate for the **ui**. Might be here, or there or somewhere
258+
| * else.
259+
| */
259260
|trait HelloWorld
260261
""".stripMargin
261262

@@ -282,10 +283,10 @@ class MarkdownTests extends DottyDocTest {
282283
|package scala
283284
|
284285
|/** This
285-
| * ====
286-
| * should quit before ![alt text](https://whatever.com/1.png "Img Text"),
287-
| * I shouldn't be visible.
288-
| */
286+
| * ====
287+
| * should quit before ![alt text](https://whatever.com/1.png "Img Text"),
288+
| * I shouldn't be visible.
289+
| */
289290
|trait HelloWorld
290291
""".stripMargin
291292

0 commit comments

Comments
 (0)