- Fixed slow editing on large files. - Only calculating appearance of lines that are seen. - Not resizing all lines when max line length changes. - Fast changing of syntax highlighting themes. - Faster startup, since not highlighting all lines.
19 lines
542 B
Python
Executable file
19 lines
542 B
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
|
|
import unittest
|
|
|
|
import diff_edit
|
|
|
|
|
|
class OverlayListTestCase(unittest.TestCase):
|
|
|
|
def test_overlay_list(self):
|
|
self.assertEqual(diff_edit.overlay_list([1, 2, 3, 4], [5, 6], 0), [5, 6, 3, 4])
|
|
self.assertEqual(diff_edit.overlay_list([1, 2, 3, 4], [5, 6], 3), [1, 2, 3, 5])
|
|
self.assertEqual(diff_edit.overlay_list([1, 2, 3, 4], [5, 6], -1), [6, 2, 3, 4])
|
|
self.assertEqual(diff_edit.overlay_list([5, 6], [1, 2, 3, 4], -1), [2, 3])
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|