Skip to content

Auto generated syntax tests shouldn't fill the gaps #398

Closed
@deathaxe

Description

@deathaxe

The command packagedev_generate_syntax_tests_for_line creates a single assertion for meta.tag in following example, while it should create two separate ones for opening and closing tags.

    <p>Our website is in maintenance mode. Please, come back later.</p>
{#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.template.twig #}
{#  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.block.any.html #}
{#  ^ punctuation.definition.tag.begin.html #}
{#   ^ entity.name.tag.block.any.html #}
{#    ^ punctuation.definition.tag.end.html #}
{#                                                                 ^^ punctuation.definition.tag.begin.html #}
{#                                                                   ^ entity.name.tag.block.any.html #}
{#                                                                    ^ punctuation.definition.tag.end.html #}

That always happens if tokens of same scope appear on a line. Created tests expect the whole region between start of first and end of last token to be scoped. Gaps are ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions