Fix scripting REPL completion after literals

This commit is contained in:
Ilya Muradyan
2020-04-17 01:38:24 +03:00
committed by Ilya Chernikov
parent d2fec96f38
commit 400ea13f07
2 changed files with 30 additions and 1 deletions
@@ -62,6 +62,23 @@ class ReplCompletionAndErrorsAnalysisTest : TestCase() {
}
}
@Test
fun testNoVariantsAfterLiterals() = test {
fun testNoVariants(testCode: String, testCursor: Int? = null) = run {
doComplete
code = testCode
cursor = testCursor ?: testCode.length
expect {
completionsMode(ComparisonType.EQUALS)
}
}
testNoVariants("val x1 = 42")
testNoVariants("val x2 = 42.42")
testNoVariants("val x3 = 'v'")
testNoVariants("val x4 = \"str42\"")
}
@Test
fun testPackagesImport() = test {