Пример #1
0
 def test_EL_IgnoresScrollRegion(self):
     """Should erase whole line."""
     self.prepare()
     esccmd.DECSET(esccmd.DECLRMM)
     esccmd.DECSLRM(2, 4)
     esccmd.CUP(Point(5, 1))
     esccmd.EL(2)
     esccmd.DECRESET(esccmd.DECLRMM)
     AssertScreenCharsInRectEqual(Rect(1, 1, 10, 1), [10 * empty()])
Пример #2
0
 def test_EL_respectsISOProtection(self):
     """EL respects SPA/EPA."""
     escio.Write("a")
     escio.Write("b")
     esccmd.SPA()
     escio.Write("c")
     esccmd.EPA()
     esccmd.CUP(Point(1, 1))
     esccmd.EL(2)
     AssertScreenCharsInRectEqual(Rect(1, 1, 3, 1), [blank() * 2 + "c"])
Пример #3
0
 def test_EL_doesNotRespectDECProtection(self):
     """EL respects DECSCA."""
     escio.Write("a")
     escio.Write("b")
     esccmd.DECSCA(1)
     escio.Write("c")
     esccmd.DECSCA(0)
     esccmd.CUP(Point(1, 1))
     esccmd.EL(2)
     AssertScreenCharsInRectEqual(Rect(1, 1, 3, 1), [empty() * 3])
Пример #4
0
 def test_EL_2(self):
   """Should erase whole line."""
   self.prepare()
   esccmd.EL(2)
   AssertScreenCharsInRectEqual(Rect(1, 1, 10, 1),
                                [ 10 * NUL ])
Пример #5
0
 def test_EL_1(self):
   """Should erase to left of cursor."""
   self.prepare()
   esccmd.EL(1)
   AssertScreenCharsInRectEqual(Rect(1, 1, 10, 1),
                                [ 5 * blank() + "fghij" ])
Пример #6
0
 def test_EL_0(self):
   """Should erase to right of cursor."""
   self.prepare()
   esccmd.EL(0)
   AssertScreenCharsInRectEqual(Rect(1, 1, 10, 1),
                                [ "abcd" + 6 * NUL ])
Пример #7
0
 def test_EL_Default(self):
     """Should erase to right of cursor."""
     self.prepare()
     esccmd.EL()
     AssertScreenCharsInRectEqual(Rect(1, 1, 10, 1), ["abcd" + 6 * empty()])