summaryrefslogtreecommitdiff
path: root/test/junit/scala/tools/nsc/interpreter/CompletionTest.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/junit/scala/tools/nsc/interpreter/CompletionTest.scala')
-rw-r--r--test/junit/scala/tools/nsc/interpreter/CompletionTest.scala13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/junit/scala/tools/nsc/interpreter/CompletionTest.scala b/test/junit/scala/tools/nsc/interpreter/CompletionTest.scala
index 7c37be126d..a216b319a8 100644
--- a/test/junit/scala/tools/nsc/interpreter/CompletionTest.scala
+++ b/test/junit/scala/tools/nsc/interpreter/CompletionTest.scala
@@ -1,10 +1,11 @@
package scala.tools.nsc.interpreter
-import java.io.{StringWriter, PrintWriter}
+import java.io.{PrintWriter, StringWriter}
import org.junit.Assert.assertEquals
import org.junit.Test
+import scala.reflect.internal.util.BatchSourceFile
import scala.tools.nsc.Settings
class CompletionTest {
@@ -175,6 +176,16 @@ class CompletionTest {
}
@Test
+ def replGeneratedCodeDeepPackages(): Unit = {
+ val intp = newIMain()
+ val completer = new PresentationCompilerCompleter(intp)
+ intp.compileSources(new BatchSourceFile("<paste>", "package p1.p2.p3; object Ping { object Pong }"))
+ checkExact(completer, "p1.p2.p")("p3")
+ checkExact(completer, "p1.p2.p3.P")("Ping")
+ checkExact(completer, "p1.p2.p3.Ping.Po")("Pong")
+ }
+
+ @Test
def performanceOfLenientMatch(): Unit = {
val intp = newIMain()
val completer = new PresentationCompilerCompleter(intp)