aboutsummaryrefslogtreecommitdiff
path: root/tests/test_z80count.py
blob: 85a9084605df6e39477edc3886940ff30ffcdbea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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