From 3bc135f36c5324cf25b864fe683931489f8ee770 Mon Sep 17 00:00:00 2001 From: Karan Ahlawat Date: Fri, 20 Oct 2023 14:19:18 +0530 Subject: [PATCH] test: add test for updated SymbolNotFound regex with -explain flag --- .../ImportMissingSymbolLspSuite.scala | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/unit/src/test/scala/tests/codeactions/ImportMissingSymbolLspSuite.scala b/tests/unit/src/test/scala/tests/codeactions/ImportMissingSymbolLspSuite.scala index eda8c2ab217..91055b0f44f 100644 --- a/tests/unit/src/test/scala/tests/codeactions/ImportMissingSymbolLspSuite.scala +++ b/tests/unit/src/test/scala/tests/codeactions/ImportMissingSymbolLspSuite.scala @@ -261,4 +261,27 @@ class ImportMissingSymbolLspSuite |""".stripMargin, ) + check( + "scalac-explain-flag", + """|package a + | + |object A { + | val f = <>.successful(2) + |} + |""".stripMargin, + s"""|${ImportMissingSymbol.title("Future", "scala.concurrent")} + |${ImportMissingSymbol.title("Future", "java.util.concurrent")} + |${CreateNewSymbol.title("Future")} + |""".stripMargin, + """|package a + | + |import scala.concurrent.Future + | + |object A { + | val f = Future.successful(2) + |} + |""".stripMargin, + scalaVersion = "3.3.1", + scalacOptions = List("-explain"), + ) }