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

strict mode for .out dir where it does not tolerate extra files and directories being generated #149

Open
faassen opened this issue Oct 14, 2022 · 1 comment

Comments

@faassen
Copy link

faassen commented Oct 14, 2022

I was surprised to learn that trycmd does not check that all files and directories in .out dir are present and the same as the generated output, but only that if they are present they should be the same. This means that if a file or directory is missing from .out it succeeds even though I expected a failure.

Now I understand you might have the use case for ignoring extra files and directories, but it's still useful to have a mode where it's strict and doesn't tolerate these to exist. It's less of a problem if you use dump to generate .out, but sometimes I want to be able to adjust an .out exactly to my expectations without going through the dump route.

In addition, because git doesn't check in empty directories; if you want to detect in CI that you're relying on them, strict mode could help find that issue.

[Edit; I got this wrong first; it does detect missing files, just tolerates additional files]

@faassen faassen changed the title .out dir tolerates missing files and directories .out dir tolerates extra files and directories being generated Oct 14, 2022
@faassen faassen changed the title .out dir tolerates extra files and directories being generated strict mode for .out dir where it does not tolerate extra files and directories being generated Oct 14, 2022
@epage
Copy link
Contributor

epage commented Oct 14, 2022

Personally, I feel like defaulting to tolerating extra files in .in is the right call as it encourages focusing on the subset of functionality being tested, causing less churn.

If we made this configurable, the ideal is per test. This can be done when using toml files but not when using trycmd files. That would require being globally configurable.

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

No branches or pull requests

2 participants