diff --git a/scala3doc/test/dotty/dokka/SignatureTest.scala b/scala3doc/test/dotty/dokka/SignatureTest.scala index 9995d6f9c5d9..98c35a863ab8 100644 --- a/scala3doc/test/dotty/dokka/SignatureTest.scala +++ b/scala3doc/test/dotty/dokka/SignatureTest.scala @@ -22,7 +22,7 @@ abstract class SignatureTest( filterFunc: (Path) => Boolean = _ => true ) extends ScaladocTest(testName): - def runTest = afterRendering { + def runTest = { org.junit.Assume.assumeTrue("Running on Windows", java.io.File.separatorChar == '/'); afterRendering { val sources = sourceFiles match case Nil => testName :: Nil case s => s @@ -65,7 +65,7 @@ abstract class SignatureTest( reportError(errorMessage) end if - } :: Nil + } :: Nil } // e.g. to remove '(0)' from object IAmACaseObject extends CaseImplementThis/*<-*/(0)/*->*/ private val commentRegex = raw"\/\*<-\*\/[^\/]+\/\*->\*\/".r diff --git a/tests/run-custom-args/tasty-inspector/tastyPaths.check b/tests/run-custom-args/tasty-inspector/tastyPaths.check index edc6e3ee2b64..4aab4bcb2590 100644 --- a/tests/run-custom-args/tasty-inspector/tastyPaths.check +++ b/tests/run-custom-args/tasty-inspector/tastyPaths.check @@ -1,2 +1,2 @@ -List(tastyPaths/I8163.class) +List(/tastyPaths/I8163.class) `reflect.SourceFile.current` cannot be called within the TASTy ispector diff --git a/tests/run-custom-args/tasty-inspector/tastyPaths.scala b/tests/run-custom-args/tasty-inspector/tastyPaths.scala index 7977c5fc667b..f13b0ee24f89 100644 --- a/tests/run-custom-args/tasty-inspector/tastyPaths.scala +++ b/tests/run-custom-args/tasty-inspector/tastyPaths.scala @@ -1,6 +1,8 @@ import scala.quoted._ import scala.tasty.inspector._ +import java.io.File.separatorChar + opaque type PhoneNumber = String case class I8163() { @@ -23,7 +25,7 @@ object Test { class TestInspector() extends Inspector: def inspect(using Quotes)(tastys: List[Tasty[quotes.type]]): Unit = - println(tastys.map(_.path.split("/tasty-inspector/").last)) + println(tastys.map(_.path.split("tasty-inspector").last.replace(separatorChar, '/'))) try quotes.reflect.SourceFile.current assert(false)