Skip to content

Commit

Permalink
Add test confirmation for #413
Browse files Browse the repository at this point in the history
  • Loading branch information
ileasile committed May 9, 2023
1 parent e2e6a69 commit 397addc
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import org.jetbrains.kotlinx.jupyter.repl.ListErrorsResult
import org.jetbrains.kotlinx.jupyter.test.getOrFail
import org.jetbrains.kotlinx.jupyter.withPath
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertThrows
import java.io.File
import java.nio.file.Path
import kotlin.script.experimental.api.SourceCode
Expand Down Expand Up @@ -544,4 +545,16 @@ class ReplTests : AbstractSingleReplTest() {
eval("fun b() = a")
eval("b()").renderedValue shouldBe 1
}

@Test
fun testRegexBug413() {
val code = """
Regex("(?<x>[0-9]*)").matchEntire("123456789")?.groups?.get("x")?.value
""".trimIndent()

eval(code)
assertThrows<ReplEvalRuntimeException> {
eval(code)
}
}
}

0 comments on commit 397addc

Please sign in to comment.