diff options
author | Mook <marky@activestate.com> | 2013-02-25 15:20:58 -0800 |
---|---|---|
committer | Mook <marky@activestate.com> | 2013-02-25 15:20:58 -0800 |
commit | c6d4cd5d9f42251c20cfc9c80ac80389a39abfbe (patch) | |
tree | 617539076499c039e0504bf5c264ab4c067728a4 /test/simpleTests.py | |
parent | e6e91e20e83079fc3ccc14277b6c93dcb7fd30d6 (diff) | |
download | scintilla-mirror-c6d4cd5d9f42251c20cfc9c80ac80389a39abfbe.tar.gz |
Editor: SCI_LINESCROLL: treat columns as signed
Diffstat (limited to 'test/simpleTests.py')
-rw-r--r-- | test/simpleTests.py | 10 |
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 |