diff options
Diffstat (limited to 'test/scaladoc/run/SI-191.scala')
-rw-r--r-- | test/scaladoc/run/SI-191.scala | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/scaladoc/run/SI-191.scala b/test/scaladoc/run/SI-191.scala index 29b1e7dd29..f3d269ceb0 100644 --- a/test/scaladoc/run/SI-191.scala +++ b/test/scaladoc/run/SI-191.scala @@ -33,10 +33,14 @@ object Test extends ScaladocModelTest { def scalaURL = "http://bog.us" override def scaladocSettings = { - val scalaLibUri = getClass.getClassLoader.getResource("scala/Function1.class").getPath.split("!")(0) - val scalaLibPath = new URI(scalaLibUri).getPath - val externalArg = s"$scalaLibPath#$scalaURL" - "-no-link-warnings -doc-external-doc " + externalArg + val samplePath = getClass.getClassLoader.getResource("scala/Function1.class").getPath + val scalaLibPath = if(samplePath.contains("!")) { // in scala-library.jar + val scalaLibUri = samplePath.split("!")(0) + new URI(scalaLibUri).getPath + } else { // individual class files on disk + samplePath.replace('\\', '/').dropRight("scala/Function1.class".length) + } + s"-no-link-warnings -doc-external-doc $scalaLibPath#$scalaURL" } def testModel(rootPackage: Package) { |