Skip to content

Commit b71acb9

Browse files
authored
Merge pull request #1937 from dotty-staging/fix/classpath-dottydoc-tests
Fix classpaths in dottydoc tests
2 parents 10bf4ee + 0f59e9f commit b71acb9

File tree

3 files changed

+26
-24
lines changed

3 files changed

+26
-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: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class MarkdownTests extends DottyDocTest {
2222
ctx.setProperty(ContextDoc, new ContextDottydoc)
2323
ctx.setSetting(
2424
ctx.settings.classpath,
25-
"../library/target/scala-2.11/dotty-library_2.11-0.1-SNAPSHOT.jar"
25+
dotty.Jars.dottyLib
2626
)
2727
base.initialize()(ctx)
2828
ctx
@@ -122,9 +122,9 @@ class MarkdownTests extends DottyDocTest {
122122
|package scala
123123
|
124124
|/** - Item1
125-
| * - Item2
126-
| * - Item3
127-
| */
125+
| * - Item2
126+
| * - Item3
127+
| */
128128
|trait HelloWorld
129129
|
130130
|trait None
@@ -153,11 +153,11 @@ class MarkdownTests extends DottyDocTest {
153153
|package scala
154154
|
155155
|/** - Item1
156-
| * - Item1a
157-
| * - Item1b
158-
| * - Item2
159-
| * - Item3
160-
| */
156+
| * - Item1a
157+
| * - Item1b
158+
| * - Item2
159+
| * - Item3
160+
| */
161161
|trait HelloWorld
162162
|
163163
|trait None
@@ -191,9 +191,9 @@ class MarkdownTests extends DottyDocTest {
191191
|package scala
192192
|
193193
|/** ```scala
194-
| * val x = 1 + 5
195-
| * ```
196-
| */
194+
| * val x = 1 + 5
195+
| * ```
196+
| */
197197
|trait HelloWorld
198198
|
199199
|trait None
@@ -250,12 +250,12 @@ class MarkdownTests extends DottyDocTest {
250250
|package scala
251251
|
252252
|/** 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-
| */
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+
| */
259259
|trait HelloWorld
260260
""".stripMargin
261261

@@ -282,10 +282,10 @@ class MarkdownTests extends DottyDocTest {
282282
|package scala
283283
|
284284
|/** This
285-
| * ====
286-
| * should quit before ![alt text](https://whatever.com/1.png "Img Text"),
287-
| * I shouldn't be visible.
288-
| */
285+
| * ====
286+
| * should quit before ![alt text](https://whatever.com/1.png "Img Text"),
287+
| * I shouldn't be visible.
288+
| */
289289
|trait HelloWorld
290290
""".stripMargin
291291

0 commit comments

Comments
 (0)