summaryrefslogtreecommitdiff
path: root/tests/test_z80count.py
diff options
context:
space:
mode:
authorAlexis Roda <alexis.roda.villalonga@gmail.com>2019-08-07 02:05:14 +0200
committerAlexis Roda <alexis.roda.villalonga@gmail.com>2019-08-07 02:05:14 +0200
commit7ed68a50b1379a8d8265ff76292ed0620d2a45e5 (patch)
tree5b88466009ea7e6111a0de8117adb13acaad4461 /tests/test_z80count.py
parent09260b3ade51201b99b945cb0d9db7cdcf10d82c (diff)
downloadz80count-7ed68a50b1379a8d8265ff76292ed0620d2a45e5.tar.gz
z80count-7ed68a50b1379a8d8265ff76292ed0620d2a45e5.zip
Fix issue 11.
Diffstat (limited to 'tests/test_z80count.py')
-rw-r--r--tests/test_z80count.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_z80count.py b/tests/test_z80count.py
new file mode 100644
index 0000000..c816359
--- /dev/null
+++ b/tests/test_z80count.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+
+import pytest
+
+from z80count.z80count import Parser
+from z80count.z80count import z80count
+
+
+@pytest.mark.parametrize("line,expected", (
+ ("PLY_InterruptionOn: call PLY_Init",
+ "PLY_InterruptionOn: call PLY_Init ; [17]\n"),
+ ("PLY_ReplayFrequency:\tld de,0",
+ "PLY_ReplayFrequency:\tld de,0 ; [10]\n"),
+
+))
+def test_issue_11(line, expected):
+ parser = Parser()
+ output, _ = z80count(line, parser, total=0, subt=False,
+ no_update=True, column=1, use_tabs=False,
+ tab_width=4, debug=False)
+ assert output == expected