Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared tests #981

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add more logic to VimTestCase
  • Loading branch information
lippfi committed Aug 30, 2024
commit 6721b2e4b85e0b79dcac7cbceb890231936e14bb
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ quux
}

// |r|
@VimBehaviorDiffers(originalVimAfter = "foXX${c}Xr\n")
@VimBehaviorDiffers(originalVimAfter = "foXX<caret>Xr\n")
@Test
fun testReplaceMultipleCharsWithCount() {
doTest("3rX", "fo${c}obar\n", "fo${c}XXXr\n", Mode.NORMAL())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ class MotionActionTest : VimTestCaseBase() {
// VIM-1287 |d| |v_i{|
@Test
@VimBehaviorDiffers(
originalVimAfter = "{\"{foo, ${c}bar\", baz}}",
originalVimAfter = "{\"{foo, <caret>bar\", baz}}",
description = "We have PSI and can resolve this case correctly. I'm not sure if it should be fixed"
)
fun testBadlyNestedBlockInsideString() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1843,7 +1843,7 @@ $c five six se${c}ven eight
)
}

@VimBehaviorDiffers(originalVimAfter = "${c}\n${c}\nabcde\n${c}\n${c}\nabcde\n")
@VimBehaviorDiffers(originalVimAfter = "<caret>\n<caret>\nabcde\n<caret>\n<caret>\nabcde\n")
@Test
fun testInsertNewLineAboveActionWithMultipleCaretsInLine() {
typeTextInFile(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class RepeatChangeActionTest : VimTestCaseBase() {
XXXXXnd it in a legendary land
XXXXXocks and lavender and tufted grass,
XXXXX it was settled on some sodden sand
hard ${c}XXXXXe torrent of a mountain pass.
hard <caret>XXXXXe torrent of a mountain pass.

""",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class ChangeVisualActionTest : VimTestCaseBase() {
Lorem ipsum dolor sit amet,
consectetur adipiscing elit

${c}
<caret>
""",
)
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class ChangeVisualLinesEndActionTest : VimTestCaseBase() {
Lorem ipsum dolor sit amet,
consectetur adipiscing elit
Sed in orci mauris.
${c}
<caret>
""",
)
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Mode.INSERT,
if (it) {
legendary
}
${c}
<caret>
""",
)
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class PutTestAfterCursorActionTest : VimTestCaseBase() {
I found it in a legendary land
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
${c}A Discovery
<caret>A Discovery
""",
)
@Test
Expand Down Expand Up @@ -106,7 +106,7 @@ class PutTestAfterCursorActionTest : VimTestCaseBase() {
@VimBehaviorDiffers(
originalVimAfter = """
A Discovery
${c}I found it in a legendary land
<caret>I found it in a legendary land
GUARD
I found it in a legendary land
all rocks and lavender and tufted grass,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ class PutVisualTextActionTest : VimTestCaseBase() {
I found it in a legendary land
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
${c}Discovery
<caret>Discovery
""",
)
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT)
Expand Down Expand Up @@ -707,10 +707,10 @@ class PutVisualTextActionTest : VimTestCaseBase() {
originalVimAfter = """
A Discovery

${c}Discovery
<caret>Discovery
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
${c}Discovery
<caret>Discovery
""",
)
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT)
Expand Down Expand Up @@ -743,10 +743,10 @@ class PutVisualTextActionTest : VimTestCaseBase() {
originalVimAfter = """
A Discovery

${c}Discovery
<caret>Discovery
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
${c}Discovery
<caret>Discovery
""",
)
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT)
Expand Down Expand Up @@ -779,10 +779,10 @@ class PutVisualTextActionTest : VimTestCaseBase() {
originalVimAfter = """
A Discovery

${c}Discovery
<caret>Discovery
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
${c}Discovery
<caret>Discovery
""",
)
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT)
Expand Down Expand Up @@ -815,10 +815,10 @@ class PutVisualTextActionTest : VimTestCaseBase() {
originalVimAfter = """
A Discovery

${c}Discovery
<caret>Discovery
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
${c}Discovery
<caret>Discovery
""",
)
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT)
Expand Down Expand Up @@ -907,7 +907,7 @@ class PutVisualTextActionTest : VimTestCaseBase() {
I found it in a legendary land
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
${c}A Discovery
<caret>A Discovery
""",
)
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT)
Expand Down Expand Up @@ -940,10 +940,10 @@ class PutVisualTextActionTest : VimTestCaseBase() {
originalVimAfter = """
A Discovery

${c}A Discovery
<caret>A Discovery
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
${c}A Discovery
<caret>A Discovery
""",
)
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT)
Expand Down Expand Up @@ -976,10 +976,10 @@ class PutVisualTextActionTest : VimTestCaseBase() {
originalVimAfter = """
A Discovery

${c}A Discovery
<caret>A Discovery
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
${c}A Discovery
<caret>A Discovery
""",
)
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT)
Expand Down Expand Up @@ -1012,10 +1012,10 @@ class PutVisualTextActionTest : VimTestCaseBase() {
originalVimAfter = """
A Discovery

${c}A Discovery
<caret>A Discovery
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
${c}A Discovery
<caret>A Discovery
""",
)
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT)
Expand Down Expand Up @@ -1048,10 +1048,10 @@ class PutVisualTextActionTest : VimTestCaseBase() {
originalVimAfter = """
A Discovery

${c}A Discovery
<caret>A Discovery
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
${c}A Discovery
<caret>A Discovery
""",
)
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT)
Expand Down Expand Up @@ -1131,7 +1131,7 @@ class PutVisualTextActionTest : VimTestCaseBase() {
The features it combines mark it as new
to science: shape and shade -- the special tinge,
akin to moonlight, tempering its blue,
$c|found|
<caret>|found|
|l roc|
|ere i|
""",
Expand Down Expand Up @@ -1188,7 +1188,7 @@ class PutVisualTextActionTest : VimTestCaseBase() {
The features it combines mark it as new
to science: shape and shade -- the special tinge,
akin to moonlight, tempering its blue,
$c|found|
<caret>|found|
|l roc|
|ere i|
|found|
Expand Down Expand Up @@ -1240,7 +1240,7 @@ class PutVisualTextActionTest : VimTestCaseBase() {
originalVimAfter = """
A Discovery

$c|found|
<caret>|found|
|l roc|
|ere i|
al|l roc|ks and lavender and tufted grass,
Expand All @@ -1250,7 +1250,7 @@ class PutVisualTextActionTest : VimTestCaseBase() {
The features it combines mark it as new
to science: shape and shade -- the special tinge,
akin to moonlight, tempering its blue,
$c|found|
<caret>|found|
|l roc|
|ere i|
""",
Expand Down Expand Up @@ -1301,7 +1301,7 @@ class PutVisualTextActionTest : VimTestCaseBase() {
originalVimAfter = """
A Discovery

$c|found|
<caret>|found|
|l roc|
|ere i|
al|l roc|ks and lavender and tufted grass,
Expand All @@ -1311,7 +1311,7 @@ class PutVisualTextActionTest : VimTestCaseBase() {
The features it combines mark it as new
to science: shape and shade -- the special tinge,
akin to moonlight, tempering its blue,
$c|found|
<caret>|found|
|l roc|
|ere i|
""",
Expand Down Expand Up @@ -1485,7 +1485,7 @@ class PutVisualTextActionTest : VimTestCaseBase() {
I it in a legendary land
alks and lavender and tufted grass,
wht was settled on some sodden sand
${c}A Discovery
<caret>A Discovery
hard by the torrent of a mountain pass.
""",
)
Expand All @@ -1495,7 +1495,7 @@ class PutVisualTextActionTest : VimTestCaseBase() {
val before = """
A Discovery

I $c|found| it in a legendary land
I <caret>|found| it in a legendary land
al|l roc|ks and lavender and tufted grass,
wh|ere i|t was settled on some sodden sand
hard by the torrent of a mountain pass.
Expand All @@ -1509,7 +1509,7 @@ class PutVisualTextActionTest : VimTestCaseBase() {
I it in a legendary land
alks and lavender and tufted grass,
wht was settled on some sodden sand
${c}A Discovery
<caret>A Discovery

hard by the torrent of a mountain pass.
""".trimIndent()
Expand Down Expand Up @@ -1549,7 +1549,7 @@ class PutVisualTextActionTest : VimTestCaseBase() {
I it in a legendary land
alks and lavender and tufted grass,
wht was settled on some sodden sand
${c}A Discovery
<caret>A Discovery
A Discovery
hard by the torrent of a mountain pass.
""",
Expand Down Expand Up @@ -1590,7 +1590,7 @@ class PutVisualTextActionTest : VimTestCaseBase() {
alks and lavender and tufted grass,
wht was settled on some sodden sand
ha the torrent of a mountain pass.
${c}A Discovery
<caret>A Discovery
""",
)
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT)
Expand Down Expand Up @@ -1627,7 +1627,7 @@ class PutVisualTextActionTest : VimTestCaseBase() {
I
a
w
${c}A Discovery
<caret>A Discovery
hard by the torrent of a mountain pass.
""",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class PutVisualTextMoveCursorActionTest : VimTestCaseBase() {
rocks and lavender and tufted grass,
re it was settled on some sodden sand
d by the torrent of a mountain pass.
${c}A Discovery
<caret>A Discovery
""",
)
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ class MotionLastColumnActionTest : VimTestCaseBase() {
originalVimAfter = """
A Discovery

I ${s}found it in a legendary lan${c}d${se}
al${s}l rocks and lavender and tufted grass${c},${se}[ additional symbols]
wh${s}ere it was settled on some sodden san${c}d${se}
I ${s}found it in a legendary lan<caret>d${se}
al${s}l rocks and lavender and tufted grass<caret>,${se}[ additional symbols]
wh${s}ere it was settled on some sodden san<caret>d${se}
hard by the torrent of a mountain pass.
""",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MotionOuterSentenceActionTest : VimTestCaseBase() {
Lorem ipsum dolor sit amet,
consectetur adipiscing elit
Sed in orci mauris.
$c
<caret>
""",
)
@Test
Expand Down Expand Up @@ -47,7 +47,7 @@ class MotionOuterSentenceActionTest : VimTestCaseBase() {
Lorem ipsum dolor sit amet,
consectetur adipiscing elit
Sed in orci mauris.
$c
<caret>
""",
)
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SearchWholeWordForwardActionTest : VimTestCaseBase() {
I found it in a legendary land
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
hard by the torrent of a mountain pass$c.
hard by the torrent of a mountain pass<caret>.
""",
)
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class SelectToggleVisualModeHandlerTest : VimTestCaseBase() {
originalVimAfter = """
A Discovery

${s}${c}I${se} found it in a legendary land
${s}<caret>I${se} found it in a legendary land
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
hard by the torrent of a mountain pass.
Expand Down Expand Up @@ -334,7 +334,7 @@ class SelectToggleVisualModeHandlerTest : VimTestCaseBase() {
A Discovery

${s}I found it in a legendary land
${c}a${se}ll rocks and lavender and tufted grass,
<caret>a${se}ll rocks and lavender and tufted grass,
where it was settled on some sodden sand
hard by the torrent of a mountain pass.
""",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class MotionNthCharacterActionTest : VimTestCaseBase() {
I found it in a legendary land
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
hard by the torrent of a mountain pass.$c
hard by the torrent of a mountain pass.<caret>
""",
)
@Test
Expand Down Expand Up @@ -201,7 +201,7 @@ class MotionNthCharacterActionTest : VimTestCaseBase() {
all rocks and lavender and tufted grass,
where it was settled on some sodden sand
hard by the torrent of a mountain pass.
$c
<caret>
""",
)
@Test
Expand Down
Loading