Skip to content

Clean up broken unit tests #183

Closed
Closed

Description

@michaelblyons

Disable non-working tests so PRs are easy to judge.

Activity

  1. deathaxe commented on Jan 6, 2025

    @deathaxe
    Member

    Why disable tests instead of fixing failing syntax test assertions?

  2. michaelblyons commented on Jan 6, 2025

    @michaelblyons
    CollaboratorAuthor

    Also a possibility. Some of them don't really make sense though. IIRC there are some number suffix things that no one would use.

  3. matteocoder commented on Jan 8, 2025

    @matteocoder
    Contributor

    @michaelblyons in my local fork I have marked the ambiguous float long syntax as invalid.deprecated, because Microsoft themselves discourage people from using it. Should I send a PR?

  4. michaelblyons commented on Jan 8, 2025

    @michaelblyons
    CollaboratorAuthor

    Sure! DeathAxe is usually not excited about deprecation marking, but this case was always ambiguous. And now that there's official guidance, I think it makes sense.

  5. matteocoder commented on Jan 8, 2025

    @matteocoder
    Contributor

    @michaelblyons Thank you! I'd like to resolve #186 before sending in this new PR. One thing I don't understand, though, is the error

    error: unexpected symbol `$x` (definition) found
    note: all symbols must be matched unless `partial-symbols` is specified
    528 |     $x..5.40D
        |     @@ this `definition` is not tested for
    

    Which pops up for every variable present in the test while testing it on my local Sublime Text. I tried googling it, but I couldn't find any relevant results. Why is the definition not tested for?

  6. michaelblyons commented on Jan 8, 2025

    @michaelblyons
    CollaboratorAuthor

    If you test for any symbols matching, it tests for all symbols unless you have partial-symbols in the first line. Any symbol encountered without a test is a failure without that first line instruction.

  7. matteocoder commented on Jan 8, 2025

    @matteocoder
    Contributor

    I see. So to solve these kinds of errors there should be a test for each variable name?

  8. michaelblyons commented on Jan 8, 2025

    @michaelblyons
    CollaboratorAuthor

    Your options are

    • test for every symbol
    • add partial-symbols to the first line after SYNTAX TEST before the file path to the syntax file.

    See https://www.sublimetext.com/docs/syntax.html#testing

  9. matteocoder commented on Jan 8, 2025

    @matteocoder
    Contributor

    I understand now, thank you!

  10. self-assigned this
    on Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

syntaxtoolingBuilding and CI/CD of this repo

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions