aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2026-03-11 11:16:55 +1100
committerNeil <nyamatongwe@gmail.com>2026-03-11 11:16:55 +1100
commit7c601c401a26d203d191b198a52e745f6a67c1fe (patch)
tree7d1d2a47a771464c6da9a38f9d4af682de564980
parent3f1838d9feb6b8348a24b6ba4a17c2c40e3541c6 (diff)
downloadscintilla-mirror-7c601c401a26d203d191b198a52e745f6a67c1fe.tar.gz
Bug [#2501]. Test to make sure #2501 stays fixed.
-rw-r--r--test/simpleTests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/simpleTests.py b/test/simpleTests.py
index 0a14a4bdb..4205c7b3a 100644
--- a/test/simpleTests.py
+++ b/test/simpleTests.py
@@ -371,6 +371,12 @@ class TestSimple(unittest.TestCase):
self.assertEqual(self.ed.Contents(), b"x" + lineEnds[lineEndType] + b"y")
self.assertEqual(self.ed.LineLength(0), 1 + len(lineEnds[lineEndType]))
+ def testLineEndConversionLengthening(self):
+ # Bug #2501
+ self.ed.AddText(4, b"x\ny\n")
+ self.ed.ConvertEOLs(self.ed.SC_EOL_CRLF)
+ self.assertEqual(self.ed.Contents(), b"x\r\ny\r\n")
+
# Several tests for unicode line ends U+2028 and U+2029
@unittest.skipUnless(unicodeLineEndsAvailable, "can not test Unicode line ends")