@@ -7,6 +7,7 @@ import dotty.tools.scaladoc.test.BuildInfo
77import java .nio .file .Path ;
88import org .jsoup .Jsoup
99import util .IO
10+ import scala .util .Properties
1011
1112class JavadocExternalLocationProviderIntegrationTest extends ExternalLocationProviderIntegrationTest (
1213 " externalJavadoc" ,
@@ -73,7 +74,6 @@ class Scaladoc2LegacyExternalLocationProviderIntegrationTest extends LegacyExter
7374 )
7475)
7576
76-
7777abstract class ExternalLocationProviderIntegrationTest (
7878 name : String ,
7979 mappings : Seq [String ],
@@ -87,31 +87,33 @@ abstract class ExternalLocationProviderIntegrationTest(
8787 ).toList
8888 )
8989
90- override def runTest = afterRendering {
91- val output = summon[DocContext ].args.output.toPath
92- val linksBuilder = List .newBuilder[String ]
90+ override def runTest = if (! Properties .isWin) {
91+ afterRendering {
92+ val output = summon[DocContext ].args.output.toPath
93+ val linksBuilder = List .newBuilder[String ]
9394
94- def processFile (path : Path ): Unit =
95- val document = Jsoup .parse(IO .read(path))
96- val content = document.select(" .documentableElement" ).forEach { elem =>
97- val hrefValues = elem.select(" a" ).asScala.map { a =>
98- a.attr(" href" )
95+ def processFile (path : Path ): Unit =
96+ val document = Jsoup .parse(IO .read(path))
97+ val content = document.select(" .documentableElement" ).forEach { elem =>
98+ val hrefValues = elem.select(" a" ).asScala.map { a =>
99+ a.attr(" href" )
100+ }
101+ linksBuilder ++= hrefValues
99102 }
100- linksBuilder ++= hrefValues
101- }
102103
103- IO .foreachFileIn(output, processFile)
104- val links = linksBuilder.result
105- val errors = expectedLinks.flatMap(expect => Option .when(! links.contains(expect))(expect))
106- if ! errors.isEmpty then {
107- val reportMessage =
108- " External location provider integration test failed.\n " +
109- " Missing links:\n "
110- + errors.mkString(" \n " ," \n " ," \n " )
111- + " Found links:" + links.mkString(" \n " ," \n " ," \n " )
112- reportError(reportMessage)
113- }
114- } :: Nil
104+ IO .foreachFileIn(output, processFile)
105+ val links = linksBuilder.result
106+ val errors = expectedLinks.flatMap(expect => Option .when(! links.contains(expect))(expect))
107+ if ! errors.isEmpty then {
108+ val reportMessage =
109+ " External location provider integration test failed.\n " +
110+ " Missing links:\n "
111+ + errors.mkString(" \n " ," \n " ," \n " )
112+ + " Found links:" + links.mkString(" \n " ," \n " ," \n " )
113+ reportError(reportMessage)
114+ }
115+ } :: Nil
116+ }
115117
116118abstract class LegacyExternalLocationProviderIntegrationTest (
117119 name : String ,
0 commit comments