Skip to content

Clean up broken unit tests #183

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

Closed
michaelblyons opened this issue Jan 6, 2025 · 9 comments · Fixed by #190
Closed

Clean up broken unit tests #183

michaelblyons opened this issue Jan 6, 2025 · 9 comments · Fixed by #190
Assignees

Comments

@michaelblyons
Copy link
Collaborator

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

@deathaxe
Copy link
Member

deathaxe commented Jan 6, 2025

Why disable tests instead of fixing failing syntax test assertions?

@michaelblyons
Copy link
Collaborator Author

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

@matteocoder
Copy link
Contributor

matteocoder commented Jan 8, 2025

@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?

@michaelblyons
Copy link
Collaborator Author

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.

@matteocoder
Copy link
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?

@michaelblyons
Copy link
Collaborator Author

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.

@matteocoder
Copy link
Contributor

matteocoder commented Jan 8, 2025

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

@michaelblyons
Copy link
Collaborator Author

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

@matteocoder
Copy link
Contributor

I understand now, thank you!

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

Successfully merging a pull request may close this issue.

3 participants