Skip to content

Commit

Permalink
#2894 two tests still failing
Browse files Browse the repository at this point in the history
  • Loading branch information
hurricup committed Sep 15, 2024
1 parent 8720773 commit 4762ed9
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions plugin/src/test/java/intellilang/PerlQuickEditTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,46 @@ class PerlQuickEditTest : PerlLightTestCase() {
)
}

@Test
fun testEmptyHeredoc() {
val (originalEditor, fragmentFile) = initFileWithTestSample(
"""
use v5.36;
sub foo{
say <<~HTML;
<caret>
HTML
}""".trimIndent(),
""
)

myFixture.type("\n hello\n there\n")
assertFalse(myFixture.editor.isDisposed)
assertEquals(
"""
hello
there
""".trimIndent(), myFixture.editor.document.text.trim().replace(Regex("[ \t]+\n"), "\n")
)

assertEquals(
"""
use v5.36;
sub foo{
say <<~HTML;
hello
there
HTML
}""".trimIndent(), originalEditor.document.text
)
}

@Test
fun testReplaceHeredoc() {
val (originalEditor, fragmentFile) = initFileWithTestSample()
Expand Down

0 comments on commit 4762ed9

Please sign in to comment.