Ejemplo n.º 1
0
 def test_ECH_respectsISOProtection(self):
     """ECH respects SPA/EPA."""
     escio.Write("a")
     escio.Write("b")
     esccmd.SPA()
     escio.Write("c")
     esccmd.EPA()
     esccmd.CUP(Point(1, 1))
     esccmd.ECH(3)
     AssertScreenCharsInRectEqual(Rect(1, 1, 3, 1), [blank() * 2 + "c"])
Ejemplo n.º 2
0
 def test_ECH_doesNotRespectDECPRotection(self):
     """ECH should not respect DECSCA."""
     escio.Write("a")
     escio.Write("b")
     esccmd.DECSCA(1)
     escio.Write("c")
     esccmd.DECSCA(0)
     esccmd.CUP(Point(1, 1))
     esccmd.ECH(3)
     AssertScreenCharsInRectEqual(Rect(1, 1, 3, 1), [blank() * 3])
Ejemplo n.º 3
0
    def test_ECH_OutsideScrollRegion(self):
        """ECH ignores the scroll region when the cursor is outside it"""
        escio.Write("abcdefg")
        esccmd.DECSET(esccmd.DECLRMM)
        esccmd.DECSLRM(2, 4)
        esccmd.CUP(Point(1, 1))
        esccmd.ECH(4)
        esccmd.DECRESET(esccmd.DECLRMM)

        AssertScreenCharsInRectEqual(Rect(1, 1, 7, 1), [blank() * 4 + "efg"])
Ejemplo n.º 4
0
    def test_S8C1T_SPA_EPA(self):
        """There is no test for SPA and EPA (it's in the erasure tests, like
    DECSED) so the test for 8 bit controls goes here."""
        escio.use8BitControls = True
        escio.Write(S8C1T)

        escio.Write("a")
        escio.Write("b")
        esccmd.SPA()
        escio.Write("c")
        esccmd.EPA()

        escio.Write(S7C1T)
        escio.use8BitControls = False

        esccmd.CUP(Point(1, 1))
        esccmd.ECH(3)
        AssertScreenCharsInRectEqual(Rect(1, 1, 3, 1), [blank() * 2 + "c"])
Ejemplo n.º 5
0
 def test_ECH_DefaultParam(self):
     """Should erase the character under the cursor."""
     escio.Write("abc")
     esccmd.CUP(Point(1, 1))
     esccmd.ECH()
     AssertScreenCharsInRectEqual(Rect(1, 1, 3, 1), [blank() + "bc"])
Ejemplo n.º 6
0
 def test_ECH_ExplicitParam(self):
     """Should erase N characters starting at the cursor."""
     escio.Write("abc")
     esccmd.CUP(Point(1, 1))
     esccmd.ECH(2)
     AssertScreenCharsInRectEqual(Rect(1, 1, 3, 1), [blank() * 2 + "c"])