mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-05-24 15:34:09 +02:00
Remove tests using obsolete newregex option
This commit is contained in:
parent
e0e7817b8b
commit
12ed60d88e
@ -951,21 +951,6 @@ class SearchGroupTest : VimTestCase() {
|
|||||||
assertPosition(0, 0)
|
assertPosition(0, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `test search beginning of file atom with old regex engine`() {
|
|
||||||
configureByText(
|
|
||||||
"""
|
|
||||||
one
|
|
||||||
${c}two
|
|
||||||
one
|
|
||||||
two
|
|
||||||
""".trimIndent()
|
|
||||||
)
|
|
||||||
enterCommand("set nousenewregex")
|
|
||||||
enterSearch("""\%^""")
|
|
||||||
assertPosition(0, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `test search end of file atom`() {
|
fun `test search end of file atom`() {
|
||||||
configureByText(
|
configureByText(
|
||||||
@ -980,21 +965,6 @@ class SearchGroupTest : VimTestCase() {
|
|||||||
assertPosition(3, 0)
|
assertPosition(3, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `test search end of file atom with old regex engine`() {
|
|
||||||
configureByText(
|
|
||||||
"""
|
|
||||||
one
|
|
||||||
two
|
|
||||||
one
|
|
||||||
two
|
|
||||||
""".trimIndent()
|
|
||||||
)
|
|
||||||
enterCommand("set nousenewregex")
|
|
||||||
enterSearch("""two\%$""")
|
|
||||||
assertPosition(3, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestFor(classes = [SearchWholeWordForwardAction::class])
|
@TestFor(classes = [SearchWholeWordForwardAction::class])
|
||||||
@Test
|
@Test
|
||||||
fun `test search word matches case`() {
|
fun `test search word matches case`() {
|
||||||
@ -2834,24 +2804,6 @@ class SearchGroupTest : VimTestCase() {
|
|||||||
assertEquals(9, res)
|
assertEquals(9, res)
|
||||||
}
|
}
|
||||||
|
|
||||||
// VIM-2510
|
|
||||||
@Test
|
|
||||||
fun `test backslash-i does not hang while trying to highlight all instances with old regex engine`() {
|
|
||||||
// \i - identifier character class.
|
|
||||||
// The old regex engine would treat '\0' as a valid identifier, which is unfortunate, because that marks the end of
|
|
||||||
// each search input line. There is also no validation on the column, so it would continuously match the end of line
|
|
||||||
// marker and increment the column even though there was no column.
|
|
||||||
// We should also be using 'isident' instead of Character.isJavaIdentifierPart, but let's not worry about the old
|
|
||||||
// engine now.
|
|
||||||
doTest(
|
|
||||||
searchCommand("/\\i"),
|
|
||||||
"""lorem ipsum""",
|
|
||||||
"""l${c}orem ipsum"""
|
|
||||||
) {
|
|
||||||
enterCommand("set hlsearch nousenewregex")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun search(pattern: String, input: String): Int {
|
private fun search(pattern: String, input: String): Int {
|
||||||
configureByText(input)
|
configureByText(input)
|
||||||
val editor = fixture.editor
|
val editor = fixture.editor
|
||||||
|
Loading…
Reference in New Issue
Block a user