plugin: run command. Lyng string "hello"*repeatCount operator. Plugin spell check is still not working properly
This commit is contained in:
1 parent
2d2a74656c
commit
6fa57c8197
17 files changed
+354
-784
No files matched your search
@@ -168,6 +168,7 @@ class MiniAstTest {
|
||||
assertNotNull(ed.doc)
|
||||
assertTrue(ed.doc.raw.contains("Enum E docs"))
|
||||
assertEquals(listOf("A", "B", "C"), ed.entries)
|
||||
assertEquals(3, ed.entryPositions.size)
|
||||
assertEquals("E", ed.name)
|
||||
}
|
||||
|
||||
|
||||
@@ -4160,6 +4160,14 @@ class ScriptTest {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testStringMul() = runTest {
|
||||
eval("""
|
||||
assertEquals("hellohello", "hello"*2)
|
||||
assertEquals("", "hello"*0)
|
||||
""".trimIndent())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testLogicalNot() = runTest {
|
||||
eval(
|
||||
@@ -4672,6 +4680,29 @@ class ScriptTest {
|
||||
// source name, in our case, is is "tc2":
|
||||
assertContains(x1.message!!, "tc2")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testFilterStackTrace() = runTest {
|
||||
var x = try {
|
||||
evalNamed( "tc1","""
|
||||
fun f2() = throw IllegalArgumentException("test3")
|
||||
fun f1() = f2()
|
||||
f1()
|
||||
""".trimIndent())
|
||||
fail("this should throw")
|
||||
}
|
||||
catch(x: ExecutionError) {
|
||||
x
|
||||
}
|
||||
assertEquals("""
|
||||
tc1:1:12: test3
|
||||
at tc1:1:12: fun f2() = throw IllegalArgumentException("test3")
|
||||
at tc1:2:12: fun f1() = f2()
|
||||
at tc1:3:1: f1()
|
||||
""".trimIndent(),x.errorObject.getLyngExceptionMessageWithStackTrace())
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
fun testLyngToKotlinExceptionHelpers() = runTest {
|
||||
var x = evalNamed( "tc1","""
|
||||
|
||||
Reference in new issue
Block a user