from typing import List

import pytest
import ass_tag_analyzer


@pytest.mark.parametrize(
    "text,expected_result",
    [
        (
            "\\{\\}",
            [
                ass_tag_analyzer.AssText("{}"),
            ],
        ),
        (
            "\\{}",
            [
                ass_tag_analyzer.AssText("{}"),
            ],
        ),
        (
            "\\{\\\\}",
            [
                ass_tag_analyzer.AssText("{\\}"),
            ],
        ),
        (
            "{\\}test",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssText("test"),
            ],
        ),
        (
            "{\\an5\\pos(960, 96)\\yshad0.01\\4c&HB2FAD9&\\1a&HFE&\\3a&HFE&\\blur2\\fad(200,300)\\t(0,1,\\xshad-1.59)}Test with multiple tag",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagAlignment(ass_tag_analyzer.Alignment(5)),
                ass_tag_analyzer.AssValidTagPosition(960, 96),
                ass_tag_analyzer.AssValidTagYShadow(0.01),
                ass_tag_analyzer.AssValidTagBackgroundColor(217, 250, 178),
                ass_tag_analyzer.AssValidTagPrimaryAlpha(254),
                ass_tag_analyzer.AssValidTagOutlineAlpha(254),
                ass_tag_analyzer.AssValidTagBlurEdgesGauss(2),
                ass_tag_analyzer.AssValidTagFade(200, 300),
                ass_tag_analyzer.AssValidTagAnimation(
                    [ass_tag_analyzer.AssValidTagXShadow(-1.59)], time1=0, time2=1
                ),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssText("Test with multiple tag"),
            ],
        ),
        (
            "text1{\\blur2}text2{\\blur}text3",
            [
                ass_tag_analyzer.AssText("text1"),
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBlurEdgesGauss(2),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssText("text2"),
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBlurEdgesGauss(0),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssText("text3"),
            ],
        ),
        ("{test", [ass_tag_analyzer.AssText("{test")]),
        ("test}", [ass_tag_analyzer.AssText("test}")]),
        (
            "text{\\p1}draw{\\p0}text",
            [
                ass_tag_analyzer.AssText("text"),
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagDraw(1),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssDraw("draw"),
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagDraw(0),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssText("text"),
            ],
        ),
        (
            "{\\an5}test",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagAlignment(ass_tag_analyzer.Alignment(5)),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssText("test"),
            ],
        ),
        (
            "{\\an}test",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagAlignment("", False),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssText("test"),
            ],
        ),
        (
            "{\\an0}test",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagAlignment("0", False),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssText("test"),
            ],
        ),
        (
            "{\\an10}test",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagAlignment("10", False),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssText("test"),
            ],
        ),
        (
            "{\\anTest}test",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagAlignment("Test", False),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssText("test"),
            ],
        ),
        (
            "{\\t(\\be20)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagAnimation(
                    [ass_tag_analyzer.AssValidTagBlurEdges(20.0)]
                ),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\t(4,\\be20)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagAnimation(
                    [ass_tag_analyzer.AssValidTagBlurEdges(20.0)], acceleration=4.0
                ),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\t(0,1000,\\be20)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagAnimation(
                    [ass_tag_analyzer.AssValidTagBlurEdges(20.0)], time1=0, time2=1000
                ),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\t(0,1000,4,\\be20)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagAnimation(
                    [ass_tag_analyzer.AssValidTagBlurEdges(20.0)],
                    acceleration=4.0,
                    time1=0,
                    time2=1000,
                ),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\t}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagAnimation([]),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\t(0,1000,\\be20,20,20,202,202,20,20)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagAnimation(
                    [ass_tag_analyzer.AssValidTagBlurEdges(20.0)], time1=0, time2=1000
                ),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\alpha&HB4&}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\alpha&HB4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\alphaH&B4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\alpha&hB4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagAlpha(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\alpha&B4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\alpha}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagAlpha(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\alpha  }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagAlpha(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\1a&HB4&}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\1a&HB4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\1aH&B4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\1a&hB4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryAlpha(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\1a&B4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\1a}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagPrimaryAlpha(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\1a  }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagPrimaryAlpha(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\2a&HB4&}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagSecondaryAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\2a&HB4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagSecondaryAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\2aH&B4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagSecondaryAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\2a&hB4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagSecondaryAlpha(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\2a&B4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagSecondaryAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\2a}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagSecondaryAlpha(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\2a  }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagSecondaryAlpha(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\3a&HB4&}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagOutlineAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\3a&HB4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagOutlineAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\3aH&B4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagOutlineAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\3a&hB4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagOutlineAlpha(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\3a&B4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagOutlineAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\3a}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagOutlineAlpha(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\3a  }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagOutlineAlpha(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\4a&HB4&}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBackgroundAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\4a&HB4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBackgroundAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\4aH&B4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBackgroundAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\4a&hB4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBackgroundAlpha(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\4a&B4}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBackgroundAlpha(180),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\4a}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagBackgroundAlpha(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\4a  }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagBackgroundAlpha(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\1c&H6465D9&}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryColor(False, 217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\1c&H6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryColor(False, 217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\1cH&6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryColor(False, 217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\1c&h6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryColor(False, 0, 0, 0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\1c&6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryColor(False, 217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\1c}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagPrimaryColor("", False),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\1c  }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagPrimaryColor("", False),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\c&H6465D9&}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryColor(True, 217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\c&H6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryColor(True, 217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\cH&6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryColor(True, 217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\c&h6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryColor(True, 0, 0, 0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\c&6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPrimaryColor(True, 217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\c}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagPrimaryColor("", True),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\c  }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagPrimaryColor("", True),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\2c&H6465D9&}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagSecondaryColor(217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\2c&H6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagSecondaryColor(217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\2cH&6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagSecondaryColor(217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\2c&h6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagSecondaryColor(0, 0, 0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\2c&6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagSecondaryColor(217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\2c}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagSecondaryColor(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\2c  }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagSecondaryColor(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\3c&H6465D9&}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagOutlineColor(217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\3c&H6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagOutlineColor(217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\3cH&6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagOutlineColor(217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\3c&h6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagOutlineColor(0, 0, 0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\3c&6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagOutlineColor(217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\3c}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagOutlineColor(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\3c  }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagOutlineColor(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\4c&H6465D9&}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBackgroundColor(217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\4c&H6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBackgroundColor(217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\4cH&6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBackgroundColor(217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\4c&h6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBackgroundColor(0, 0, 0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\4c&6465D9}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBackgroundColor(217, 101, 100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\4c}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagBackgroundColor(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\4c  }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagBackgroundColor(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\pbo4.5}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBaselineOffset(4.5),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\pbo }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBaselineOffset(0.0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\be }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBlurEdges(0.0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\beTest}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBlurEdges(0.0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\beTest}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBlurEdges(0.0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\be2.2}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBlurEdges(2.2),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\blur }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBlurEdgesGauss(0.0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\blurTest}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBlurEdgesGauss(0.0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\blur2.2}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBlurEdgesGauss(2.2),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\b0}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBold(400),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\b1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBold(700),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\b100}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBold(100),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\b99}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagBold("99"),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\b }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagBold(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\bord400.7}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagBorder(400.7),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\bord }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagBorder(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\xbord400.7}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagXBorder(400.7),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\xbord }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagXBorder(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\ybord400.7}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagYBorder(400.7),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\ybord }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagYBorder(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\clip(100,200,300,400)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagClipRectangle(False, 100, 200, 300, 400),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\clip  (100,200,300,400)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagClipRectangle(False, 100, 200, 300, 400),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\clip(100,200,300,400}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagClipRectangle(False, 100, 200, 300, 400),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\iclip(100,200,300,400)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagClipRectangle(True, 100, 200, 300, 400),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\clip100,200,300,400)}",
            [ass_tag_analyzer.AssTagListOpening(), ass_tag_analyzer.AssTagListEnding()],
        ),
        (
            "{\\clip(m 187 365 l 215 341 249 301)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagClipVector(
                    False, "m 187 365 l 215 341 249 301"
                ),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\iclip(m 187 365 l 215 341 249 301)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagClipVector(
                    True, "m 187 365 l 215 341 249 301"
                ),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\iclip(20, m 187 365 l 215 341 249 301)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagClipVector(
                    True, "m 187 365 l 215 341 249 301", 20
                ),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\p1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagDraw(1),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\p}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagDraw(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fad(0, 500)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFade(0, 500),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fad(0, 500}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFade(0, 500),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fad0, 500}",
            [ass_tag_analyzer.AssTagListOpening(), ass_tag_analyzer.AssTagListEnding()],
        ),
        (
            "{\\fade(255,0,255,0,500,1000,1500)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFadeComplex(255, 0, 255, 0, 500, 1000, 1500),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fade(255,0,255,0,500,1000,1500}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFadeComplex(255, 0, 255, 0, 500, 1000, 1500),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fade255,0,255,0,500,1000,1500)}",
            [ass_tag_analyzer.AssTagListOpening(), ass_tag_analyzer.AssTagListEnding()],
        ),
        (
            "{\\fe0}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFontEncoding(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fe k}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFontEncoding(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fe }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagFontEncoding(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fnArial}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFontName("Arial"),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fn Arial }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFontName("Arial"),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fn 0}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFontName("0"),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fn0}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagFontName("0"),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fn }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagFontName(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fscExample}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFontScale(),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fsc}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFontScale(),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fs20.1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFontSize(20.1),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fs j}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFontSize(0.0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fs }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagFontSize(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fscx20.1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFontXScale(20.1),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fscx j}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFontXScale(0.0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fscx }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagFontXScale(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fscy20.1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFontYScale(20.1),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fscy j}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagFontYScale(0.0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fscy }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagFontYScale(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\i1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagItalic(True),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\i0}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagItalic(False),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\i2}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagItalic("2"),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\i }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagItalic(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\k20.1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagKaraoke(201),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\k j}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagKaraoke(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\k }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagKaraoke(1000),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\kf20.1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagKaraokeFill(False, 201),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\kf j}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagKaraokeFill(False, 0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\kf }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagKaraokeFill(False, 1000),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\K20.1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagKaraokeFill(True, 201),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\K j}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagKaraokeFill(True, 0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\K }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagKaraokeFill(True, 1000),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\ko20.1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagKaraokeOutline(201),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\ko j}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagKaraokeOutline(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\ko }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagKaraokeOutline(1000),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\move(0.1, 5, 10, 20)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagMove(0.1, 5, 10, 20),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\move(0.1, 5, 10, 20, 30, 0}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagMove(0.1, 5, 10, 20, 30, 0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\move0, 500}",
            [ass_tag_analyzer.AssTagListOpening(), ass_tag_analyzer.AssTagListEnding()],
        ),
        (
            "{\\pos(0.1, 5)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPosition(0.1, 5),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\pos(0.1, 5}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagPosition(0.1, 5),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\pos0, 500}",
            [ass_tag_analyzer.AssTagListOpening(), ass_tag_analyzer.AssTagListEnding()],
        ),
        (
            "{\\rDefault}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagResetStyle("Default"),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\r Arial }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagResetStyle(" Arial"),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\r }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagResetStyle(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\org(0.1, 5)}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagRotationOrigin(0.1, 5),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\org(0.1, 5, )}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagRotationOrigin(0.1, 5),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\org(0.1, 5}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagRotationOrigin(0.1, 5),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\org0, 500}",
            [ass_tag_analyzer.AssTagListOpening(), ass_tag_analyzer.AssTagListEnding()],
        ),
        (
            "{\\org(0.1, 5, 20)}",
            [ass_tag_analyzer.AssTagListOpening(), ass_tag_analyzer.AssTagListEnding()],
        ),
        (
            "{\\shad20.1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagShadow(20.1),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\shad j}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagShadow(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\shad }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagShadow(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\xshad20.1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagXShadow(20.1),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\xshad j}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagXShadow(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\xshad }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagXShadow(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\yshad20.1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagYShadow(20.1),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\yshad j}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagYShadow(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\yshad }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagYShadow(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\s1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagStrikeout(True),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\s0}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagStrikeout(False),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\s2}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagStrikeout("2"),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\s }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagStrikeout(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\u1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagUnderline(True),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\u0}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagUnderline(False),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\u2}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagUnderline("2"),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\u }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagUnderline(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\q1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagWrapStyle(ass_tag_analyzer.WrapStyle(1)),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\q-1}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagWrapStyle("-1"),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\q }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagWrapStyle(""),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\frx400.7}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagXRotation(400.7),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\frx }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagXRotation(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fry400.7}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagYRotation(400.7),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fry }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagYRotation(0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fr400.7}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagZRotation(True, 400.7),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fr }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagZRotation("", True),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\frz400.7}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagZRotation(False, 400.7),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\frz }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssInvalidTagZRotation("", False),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fax400.7}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagXShear(400.7),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fax }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagXShear(0.0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fay400.7}",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagYShear(400.7),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\fay }",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagYShear(0.0),
                ass_tag_analyzer.AssTagListEnding(),
            ],
        ),
        (
            "{\\}test",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssText("test"),
            ],
        ),
        (
            "{this is a comment}test",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssComment("this is a comment"),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssText("test")
            ],
        ),
        (
            "{ comment1 \\t(20,20,20,230,3.4.3,\\fscx10) comment2 \\t(20,20,20,230,3.4.3,\\fscx10) comment3 }test",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssComment(" comment1 "),
                ass_tag_analyzer.AssValidTagAnimation([]),
                ass_tag_analyzer.AssComment(" comment2 "),
                ass_tag_analyzer.AssValidTagAnimation([]),
                ass_tag_analyzer.AssComment(" comment3 "),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssText("test")
            ],
        ),
        (
            "{\\t(20,20,20,230,3.4.3,\\fscx10))}test",
            [
                ass_tag_analyzer.AssTagListOpening(),
                ass_tag_analyzer.AssValidTagAnimation([]),
                ass_tag_analyzer.AssComment(")"),
                ass_tag_analyzer.AssTagListEnding(),
                ass_tag_analyzer.AssText("test")
            ],
        ),
    ],
)
def test_parse_tag(text: str, expected_result: List[ass_tag_analyzer.AssItem]):
    assert ass_tag_analyzer.parse_line(text) == expected_result
