diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-09-24 14:31:01 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-09-24 14:31:01 +0200 |
commit | fe53185d8d78a127ec353cd7e6ca841d6b04b5c3 (patch) | |
tree | 4d95bc66e8354e0eb9135aaf1fa102761fb59dff /test | |
parent | a6c1687aa762bc8317fe4995ec1b26bed64865e8 (diff) | |
parent | fb299f80f3f85e935695d5b7cb7f2c712b150e3c (diff) | |
download | scala-fe53185d8d78a127ec353cd7e6ca841d6b04b5c3.tar.gz scala-fe53185d8d78a127ec353cd7e6ca841d6b04b5c3.tar.bz2 scala-fe53185d8d78a127ec353cd7e6ca841d6b04b5c3.zip |
Merge pull request #4766 from retronym/topic/completely-tweaks
Improvements to REPL completion for annotations and string interpolation
Diffstat (limited to 'test')
-rw-r--r-- | test/junit/scala/tools/nsc/interpreter/CompletionTest.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/junit/scala/tools/nsc/interpreter/CompletionTest.scala b/test/junit/scala/tools/nsc/interpreter/CompletionTest.scala index 514f30571e..78ebb7cf9c 100644 --- a/test/junit/scala/tools/nsc/interpreter/CompletionTest.scala +++ b/test/junit/scala/tools/nsc/interpreter/CompletionTest.scala @@ -52,6 +52,25 @@ class CompletionTest { } @Test + def annotations(): Unit = { + val intp = newIMain() + val completer = new PresentationCompilerCompleter(intp) + checkExact(completer, "def foo[@specialize", " A]")("specialized") + checkExact(completer, "def foo[@specialize")("specialized") + checkExact(completer, """@deprecatedN""", """ class Foo""")("deprecatedName") + checkExact(completer, """@deprecateN""")("deprecatedName") + checkExact(completer, """{@deprecateN""")("deprecatedName") + } + + @Test + def incompleteStringInterpolation(): Unit = { + val intp = newIMain() + val completer = new PresentationCompilerCompleter(intp) + checkExact(completer, """val x_y_z = 1; s"${x_""", "}\"")("x_y_z") + checkExact(completer, """val x_y_z = 1; s"${x_""", "\"")("x_y_z") + } + + @Test def symbolically(): Unit = { val intp = newIMain() val completer = new PresentationCompilerCompleter(intp) |