예제 #1
0
  def test_ResetColor_All(self):
    esccmd.ChangeColor("3", "?")
    original = escio.ReadOSC("4")

    esccmd.ChangeColor("3", "#aabbcc")
    esccmd.ChangeColor("3", "?")
    AssertEQ(escio.ReadOSC("4"), ";3;rgb:aaaa/bbbb/cccc")

    esccmd.ResetColor()
    esccmd.ChangeColor("3", "?")
    AssertEQ(escio.ReadOSC("4"), original)
예제 #2
0
  def test_ResetColor_Standard(self):
    n = "0"
    esccmd.ChangeColor(n, "?")
    original = escio.ReadOSC("4")

    esccmd.ChangeColor(n, "#aaaabbbbcccc")
    esccmd.ChangeColor(n, "?")
    AssertEQ(escio.ReadOSC("4"), ";" + n + ";rgb:aaaa/bbbb/cccc")

    esccmd.ResetColor(n)
    esccmd.ChangeColor(n, "?")
    AssertEQ(escio.ReadOSC("4"), original)
예제 #3
0
    def test_ChangeColor_Multiple(self):
        """OSC 4 ; c1 ; spec1 ; s2 ; spec2 ; ST"""
        esccmd.ChangeColor("0", "rgb:f0f0/f0f0/f0f0", "1",
                           "rgb:f0f0/0000/0000")
        esccmd.ChangeColor("0", "?", "1", "?")
        AssertEQ(escio.ReadOSC("4"), ";0;rgb:f0f0/f0f0/f0f0")
        AssertEQ(escio.ReadOSC("4"), ";1;rgb:f0f0/0000/0000")

        esccmd.ChangeColor("0", "rgb:8080/8080/8080", "1",
                           "rgb:8080/0000/0000")
        esccmd.ChangeColor("0", "?", "1", "?")
        AssertEQ(escio.ReadOSC("4"), ";0;rgb:8080/8080/8080")
        AssertEQ(escio.ReadOSC("4"), ";1;rgb:8080/0000/0000")
예제 #4
0
 def doChangeColorTest(self, c, value, rgb):
   esccmd.ChangeColor(c, value)
   esccmd.ChangeColor(c, "?")
   s = escio.ReadOSC("4")
   AssertEQ(s, ";" + c + ";rgb:" + rgb)