Exemple #1
0
    def test_op_print(self):
        op = opcodes.op_print()
        op.text = ztext.to_bytes(ztext.from_zscii("This is a test"))

        self.cpu.print_line(op.text)

        self.mymox.ReplayAll()
        op.execute(self.cpu)
        self.mymox.VerifyAll()
Exemple #2
0
 def testCanEncodeZTextToMemory(self):
     self.assertEquals([0x98, 0xE8],ztext.to_bytes(ztext.from_zscii("abc")))
     self.assertEquals([0x90, 0x84], ztext.to_bytes(ztext.from_zscii("")))
     self.assertEquals([0x10, 0xC7, 0xA0, 0x84],ztext.to_bytes(ztext.from_zscii("Abc")))