Esempio n. 1
0
  def test_REP_RespectsTopBottomMargins(self):
    width = GetScreenSize().width()
    esccmd.DECSTBM(2, 4)
    esccmd.CUP(Point(width - 2, 4))
    escio.Write("a")
    esccmd.REP(3)

    AssertScreenCharsInRectEqual(Rect(1, 3, width, 4),
                                 [empty() * (width - 3) + "aaa",
                                  "a" + empty() * (width - 1)])
Esempio n. 2
0
  def test_REP_RespectsLeftRightMargins(self):
    esccmd.DECSET(esccmd.DECLRMM)
    esccmd.DECSLRM(2, 4)
    esccmd.CUP(Point(2, 1))
    escio.Write("a")
    esccmd.REP(3)
    esccmd.DECRESET(esccmd.DECLRMM)

    AssertScreenCharsInRectEqual(Rect(1, 1, 5, 2),
                                 [empty() + "aaa" + empty(),
                                  empty() + "a" + empty() * 3])
Esempio n. 3
0
 def test_REP_ExplicitParam(self):
   escio.Write("a")
   esccmd.REP(2)
   AssertScreenCharsInRectEqual(Rect(1, 1, 4, 1), ["aaa" + empty()])
Esempio n. 4
0
 def test_REP_DefaultParam(self):
   escio.Write("a")
   esccmd.REP()
   AssertScreenCharsInRectEqual(Rect(1, 1, 3, 1), ["aa" + empty()])