From f2d0630f20bfa76181556affeabc5284a40c8407 Mon Sep 17 00:00:00 2001 From: Peter McGoron Date: Sat, 25 Feb 2023 21:07:23 +0000 Subject: [PATCH] test repeat db --- asm/test.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/asm/test.py b/asm/test.py index 986a06d..9e82f9d 100644 --- a/asm/test.py +++ b/asm/test.py @@ -448,6 +448,17 @@ class DataTest(unittest.TestCase): self.assertEqual(ex(), ffi.RunRet.STOP) self.assertEqual(ex.getdat(0), [1,2,3,4]) self.assertEqual(ex.getdat(1), [0x10,0x11,0x12,0x13]) + def test_alloc_repeat(self): + p = Program() + p.parse_lines([ + "db d0 [1,2,3,4]", + "db d1 [10,11,12,13]", + "db d0 [5,6,7,8,9]" + ]) + ex = ffi.Environment(p()) + self.assertEqual(ex(), ffi.RunRet.STOP) + self.assertEqual(ex.getdat(0), [5,6,7,8,9]) + self.assertEqual(ex.getdat(1), [0x10,0x11,0x12,0x13]) class SCEnv(ffi.Environment): def syscall(self, s):