diff options
author | Neil <nyamatongwe@gmail.com> | 2024-07-27 12:35:18 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2024-07-27 12:35:18 +1000 |
commit | 76ef74bc44e201562320906ca18d3add7084ff8b (patch) | |
tree | 6f8ea39c723a28fb9d355eb7894833689a05c68e /test | |
parent | 12edbfc7840bc4c56d1a7933e587694e9c774aee (diff) | |
download | scintilla-mirror-76ef74bc44e201562320906ca18d3add7084ff8b.tar.gz |
Feature [feature-requests:#1530]. SCI_SETCOPYSEPARATOR sets string to separate
parts of multiple selection when copied.
Diffstat (limited to 'test')
-rw-r--r-- | test/simpleTests.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/test/simpleTests.py b/test/simpleTests.py index 4f5b7251a..1ca5b76cb 100644 --- a/test/simpleTests.py +++ b/test/simpleTests.py @@ -1974,9 +1974,7 @@ class TestMultiSelection(unittest.TestCase): self.assertEqual(self.ed.Contents(), result) def testMultipleCopy(self): - self.ed.ClearAll() - t = b"abc\n123\nxyz" - self.ed.AddText(len(t), t) + self.ed.SetContents(b"abc\n123\nxyz") self.ed.SetSelection(4, 5) # 1 self.ed.AddSelection(1, 3) # bc self.ed.AddSelection(10, 11) # z @@ -1986,6 +1984,21 @@ class TestMultiSelection(unittest.TestCase): self.ed.Paste() self.assertEqual(self.ed.Contents(), b"1bcz") + def testCopySeparator(self): + self.assertEqual(self.ed.GetCopySeparator(), b"") + self.ed.CopySeparator = b"_" + self.assertEqual(self.ed.GetCopySeparator(), b"_") + self.ed.SetContents(b"abc\n123\nxyz") + self.ed.SetSelection(4, 5) # 1 + self.ed.AddSelection(1, 3) # bc + self.ed.AddSelection(10, 11) # z + self.ed.Copy() + self.ed.ClearAll() + self.ed.Paste() + # 1,bc,z separated by _ + self.assertEqual(self.ed.Contents(), b"1_bc_z") + self.ed.CopySeparator = b"" + def testPasteConversion(self): # Test that line ends are converted to current mode self.ed.SetSelection(0, 11) |