Diff of /test/simpleTests.py [cc4cd0] .. [5c2f72]  Maximize  Restore

Switch to unified view

a/test/simpleTests.py b/test/simpleTests.py
...
...
971
        self.xite = XiteWin.xiteFrame
971
        self.xite = XiteWin.xiteFrame
972
        self.ed = self.xite.ed
972
        self.ed = self.xite.ed
973
        self.ed.ClearAll()
973
        self.ed.ClearAll()
974
        self.ed.EmptyUndoBuffer()
974
        self.ed.EmptyUndoBuffer()
975
        # 150 should be enough lines
975
        # 150 should be enough lines
976
        self.ed.InsertText(0, b"a\n" * 150)
976
        self.ed.InsertText(0, b"a" * 150 + b"\n" * 150)
977
977
978
    def testTop(self):
978
    def testTop(self):
979
        self.ed.GotoLine(0)
979
        self.ed.GotoLine(0)
980
        self.assertEquals(self.ed.FirstVisibleLine, 0)
980
        self.assertEquals(self.ed.FirstVisibleLine, 0)
981
981
982
    def testLineScroll(self):
982
    def testLineScroll(self):
983
        self.ed.GotoLine(0)
983
        self.ed.GotoLine(0)
984
        self.ed.LineScroll(0, 3)
984
        self.ed.LineScroll(0, 3)
985
        self.assertEquals(self.ed.FirstVisibleLine, 3)
985
        self.assertEquals(self.ed.FirstVisibleLine, 3)
986
      self.ed.LineScroll(0, -2)
987
      self.assertEquals(self.ed.FirstVisibleLine, 1)
988
      self.assertEquals(self.ed.XOffset, 0)
989
      self.ed.LineScroll(10, 0)
990
      self.assertGreater(self.ed.XOffset, 0)
991
      scroll_width = float(self.ed.XOffset) / 10
992
      self.ed.LineScroll(-2, 0)
993
      self.assertEquals(self.ed.XOffset, scroll_width * 8)
986
994
987
    def testVisibleLine(self):
995
    def testVisibleLine(self):
988
        self.ed.FirstVisibleLine = 7
996
        self.ed.FirstVisibleLine = 7
989
        self.assertEquals(self.ed.FirstVisibleLine, 7)
997
        self.assertEquals(self.ed.FirstVisibleLine, 7)
990
998

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks