mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-05 01:23:45 -06:00
fix: map a file edited line for line as changed
This commit is contained in:
1 parent
42dfc87e24
commit
5fba72f1a3
2 files changed
+16
-1
No files matched your search
@@ -387,6 +387,14 @@ class TestAnchorBlock(unittest.TestCase):
|
||||
self.assertEqual(result.status, "CHANGED")
|
||||
self.assertEqual(result.start, line)
|
||||
|
||||
def test_a_file_rewritten_line_for_line_is_changed_not_gone(self):
|
||||
# fheroes2 version.txt:1 went from 1.0.11 to 1.1.17. With no
|
||||
# unchanged line left the file read GONE and held the whole recale.
|
||||
result = anchor_block(["1.0.11"], ["1.1.17"], 1, 1)
|
||||
self.assertEqual((result.status, result.start, result.end), ("CHANGED", 1, 1))
|
||||
result = anchor_block(["a = 1", "b = 2"], ["a = 3", "b = 4"], 2, 2)
|
||||
self.assertEqual((result.status, result.start), ("CHANGED", 2))
|
||||
|
||||
def test_gone_when_content_vanished(self):
|
||||
result = anchor_block(["a", "unique marker", "b"], ["x"] * 200, 2, 2)
|
||||
self.assertEqual(result.status, "GONE")
|
||||
|
||||
Reference in new issue
Block a user