diff --git a/modules/tests/src/test/scala/ch/epfl/scala/debugadapter/ScalaEvaluationTests.scala b/modules/tests/src/test/scala/ch/epfl/scala/debugadapter/ScalaEvaluationTests.scala index 14375a4da..f15590f39 100644 --- a/modules/tests/src/test/scala/ch/epfl/scala/debugadapter/ScalaEvaluationTests.scala +++ b/modules/tests/src/test/scala/ch/epfl/scala/debugadapter/ScalaEvaluationTests.scala @@ -2748,4 +2748,24 @@ abstract class ScalaEvaluationTests(scalaVersion: ScalaVersion) extends DebugTes Evaluation.success("c.x", "x") ) } + + test("evaluation with -no-indent") { + assume(scalaVersion.isScala3) + val source = + """|package example + | + |object Main { + | def main(args: Array[String]): Unit = + | println(1 + 2) + | val x = 1 + | x + 1 + |} + |""".stripMargin + implicit val debuggee: TestingDebuggee = + TestingDebuggee.mainClass(source, "example.Main", scalaVersion, Seq("-no-indent")) + check( + Breakpoint(5), + Evaluation.success("1 + 2", 3) + ) + } } diff --git a/modules/tests/src/test/scala/ch/epfl/scala/debugadapter/internal/ClassEntryLookUpStats.scala b/modules/tests/src/test/scala/ch/epfl/scala/debugadapter/internal/ClassEntryLookUpStats.scala index 31353cef1..bf5227202 100644 --- a/modules/tests/src/test/scala/ch/epfl/scala/debugadapter/internal/ClassEntryLookUpStats.scala +++ b/modules/tests/src/test/scala/ch/epfl/scala/debugadapter/internal/ClassEntryLookUpStats.scala @@ -12,12 +12,16 @@ import ch.epfl.scala.debugadapter.Library import java.nio.file.Paths import ch.epfl.scala.debugadapter.SourceJar import munit.Location +import scala.util.Properties /** * This is a test class that also * prints some stats about loading the look-up of some libraries */ class ClassEntryLookUpStats extends FunSuite { + // not working on Mac anymore because of JVM index + override def munitIgnore: Boolean = Properties.isMac + override def munitTimeout: Duration = 120.seconds private val jvmCache = JvmCache().withDefaultIndex diff --git a/modules/tests/src/test/scala/ch/epfl/scala/debugadapter/internal/SourceLookUpProviderSpec.scala b/modules/tests/src/test/scala/ch/epfl/scala/debugadapter/internal/SourceLookUpProviderSpec.scala index 509a6926f..1ad3dab75 100644 --- a/modules/tests/src/test/scala/ch/epfl/scala/debugadapter/internal/SourceLookUpProviderSpec.scala +++ b/modules/tests/src/test/scala/ch/epfl/scala/debugadapter/internal/SourceLookUpProviderSpec.scala @@ -6,9 +6,11 @@ import ch.epfl.scala.debugadapter.SourceJar import ch.epfl.scala.debugadapter.Library import ch.epfl.scala.debugadapter.testfmk.NoopLogger import munit.FunSuite +import scala.util.Properties class SourceLookUpProviderSpec extends FunSuite { test("fix https://github.com/scalameta/metals/issues/3477#issuecomment-1013458270") { + assume(!Properties.isMac) // TODO not working on MacOS val artifacts = coursier .Fetch() .addDependencies(Dependency(Module(Organization("org.openjfx"), ModuleName("javafx-controls")), "17.0.1"))