diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2024-04-29 22:38:21 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2024-04-29 22:38:21 +0300 |
| commit | ac0efecc5558687b1215264896b436b33353c7ec (patch) | |
| tree | 92462e6e15a8c53858f240b02cf93de511ed555e /test/e2e | |
| parent | 49c6b2739f166c62764574335650535c84bb07a1 (diff) | |
Make @include idempotent
Diffstat (limited to 'test/e2e')
| -rw-r--r-- | test/e2e/include_idempotency/p1.atk16 | 4 | ||||
| -rw-r--r-- | test/e2e/include_idempotency/p2.atk16 | 6 | ||||
| -rw-r--r-- | test/e2e/include_idempotency/test_include_idempotent.py | 14 |
3 files changed, 24 insertions, 0 deletions
diff --git a/test/e2e/include_idempotency/p1.atk16 b/test/e2e/include_idempotency/p1.atk16 new file mode 100644 index 0000000..f9f6363 --- /dev/null +++ b/test/e2e/include_idempotency/p1.atk16 @@ -0,0 +1,4 @@ +@include %bootstrap + +@label main + hlt diff --git a/test/e2e/include_idempotency/p2.atk16 b/test/e2e/include_idempotency/p2.atk16 new file mode 100644 index 0000000..c6d46b9 --- /dev/null +++ b/test/e2e/include_idempotency/p2.atk16 @@ -0,0 +1,6 @@ +@include %bootstrap +@include %bootstrap +@include %bootstrap + +@label main + hlt diff --git a/test/e2e/include_idempotency/test_include_idempotent.py b/test/e2e/include_idempotency/test_include_idempotent.py new file mode 100644 index 0000000..e7b4fc8 --- /dev/null +++ b/test/e2e/include_idempotency/test_include_idempotent.py @@ -0,0 +1,14 @@ +import os.path +from test.utils import assemble_and_run_until_halted + +def test_include_idempotent(): + machine1 = assemble_and_run_until_halted( + os.path.join(os.path.dirname(__file__), "p1.atk16") + ) + + machine2 = assemble_and_run_until_halted( + os.path.join(os.path.dirname(__file__), "p2.atk16") + ) + + for i in range(len(machine1.rom.memory)): + assert machine1.rom.memory[i] == machine2.rom.memory[i] |
