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

Enable strict text checking by default #488

Merged
merged 2 commits into from
Jan 8, 2024
Merged

Conversation

niknetniko
Copy link
Member

  • Text is now checked strictly be default: there must be an exact match.
    • The option ignoreWhitespace is still present and can be used to revert to the current behaviour if needed.
  • By default, we ensure that the expected values for stdout/stderr in the DSL end with a newline.
    • We only add a newline if there is none.
    • This can be disabled by setting normalizeTrailingNewlines to false.
    • We also apply this when using custom oracles.
  • We don't do this for JSON test suites, so those should be updated (but apart from a few non-used exercises from us, no one uses the JSON test suites, so I don't think this is a problem).

Fixes #462.

This enables strict checking of text outputs by default. To prevent
problems with test suites, trailing newline normalization of the test
suite is enabled by default (e.g. we ensure the text ends with a
newline).
There were some edge cases that needed to be fixed, in addition to a lot
of tests that needed to be adjusted for strict text checking.
@niknetniko niknetniko merged commit ee807a8 into master Jan 8, 2024
7 checks passed
@niknetniko niknetniko deleted the enhance/newlines branch January 8, 2024 12:55
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 this pull request may close these issues.

Do not ignore leading & trailing whitespace by default
1 participant