mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
go for the full line match first
This commit is contained in:
parent
004c0529c6
commit
e60a332fda
2 changed files with 7 additions and 6 deletions
|
@ -23,9 +23,9 @@ class TestUtils(unittest.TestCase):
|
|||
|
||||
def test_replace_most_similar_chunk(self):
|
||||
whole = "This is a sample text.\nAnother line of text.\nYet another line.\n"
|
||||
part = "This is a sample text"
|
||||
replace = "This is a replaced text."
|
||||
expected_output = "This is a replaced text..\nAnother line of text.\nYet another line.\n"
|
||||
part = "This is a sample text\n"
|
||||
replace = "This is a replaced text.\n"
|
||||
expected_output = "This is a replaced text.\nAnother line of text.\nYet another line.\n"
|
||||
|
||||
result = eb.replace_most_similar_chunk(whole, part, replace)
|
||||
self.assertEqual(result, expected_output)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue