diff options
author | Juan J. MartÃnez <jjm@usebox.net> | 2019-08-07 06:49:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-07 06:49:29 +0100 |
commit | d6c52edb57bbd63169b184f81db6ad56b9434215 (patch) | |
tree | 033d7fb7013ac616afb4c5c22ea67e7c8a5b597e /tests/test_z80count.py | |
parent | 09260b3ade51201b99b945cb0d9db7cdcf10d82c (diff) | |
parent | fd9f4e10bf775303d19273feaf327b4f5c52a74a (diff) | |
download | z80count-d6c52edb57bbd63169b184f81db6ad56b9434215.tar.gz z80count-d6c52edb57bbd63169b184f81db6ad56b9434215.zip |
Merge pull request #14 from patxoca/issue-11
Fix issue 11
Diffstat (limited to 'tests/test_z80count.py')
-rw-r--r-- | tests/test_z80count.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test_z80count.py b/tests/test_z80count.py new file mode 100644 index 0000000..85a9084 --- /dev/null +++ b/tests/test_z80count.py @@ -0,0 +1,23 @@ +# -*- 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_Interruption.On: call PLY_Init", + "$PLY_Interruption.On: 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 |