Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
deathaxe opened this issue Oct 20, 2024 · 0 comments
Open

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

deathaxe opened this issue Oct 20, 2024 · 0 comments
Labels

Comments

@deathaxe
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants