aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/simpleTests.py
diff options
context:
space:
mode:
authorMook <marky@activestate.com>2013-02-25 15:20:58 -0800
committerMook <marky@activestate.com>2013-02-25 15:20:58 -0800
commit124b2f79616f21eb4189a45bead308c628b56242 (patch)
tree68f3bd9a2d1eca34f8bd3e411a4baf2a43a032e6 /test/simpleTests.py
parentc73567a8b582af6150c24cf54aa731e2ff8cbf96 (diff)
downloadscintilla-mirror-124b2f79616f21eb4189a45bead308c628b56242.tar.gz
Editor: SCI_LINESCROLL: treat columns as signed
Diffstat (limited to 'test/simpleTests.py')
-rw-r--r--test/simpleTests.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/simpleTests.py b/test/simpleTests.py
index 4d397261a..53afee1bd 100644
--- a/test/simpleTests.py
+++ b/test/simpleTests.py
@@ -973,7 +973,7 @@ class TestScrolling(unittest.TestCase):
self.ed.ClearAll()
self.ed.EmptyUndoBuffer()
# 150 should be enough lines
- self.ed.InsertText(0, b"a\n" * 150)
+ self.ed.InsertText(0, b"a" * 150 + b"\n" * 150)
def testTop(self):
self.ed.GotoLine(0)
@@ -983,6 +983,14 @@ class TestScrolling(unittest.TestCase):
self.ed.GotoLine(0)
self.ed.LineScroll(0, 3)
self.assertEquals(self.ed.FirstVisibleLine, 3)
+ self.ed.LineScroll(0, -2)
+ self.assertEquals(self.ed.FirstVisibleLine, 1)
+ self.assertEquals(self.ed.XOffset, 0)
+ self.ed.LineScroll(10, 0)
+ self.assertGreater(self.ed.XOffset, 0)
+ scroll_width = float(self.ed.XOffset) / 10
+ self.ed.LineScroll(-2, 0)
+ self.assertEquals(self.ed.XOffset, scroll_width * 8)
def testVisibleLine(self):
self.ed.FirstVisibleLine = 7