-
Notifications
You must be signed in to change notification settings - Fork 3
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
Windows portability (fix #16) #31
Conversation
6c9bd92
to
4bd92ee
Compare
setCurrentDirectory is persistent
This is WIP for debugging purposes, requires the self-tests to be run in interactive mode.
Slashes are accepted as path separator also under Windows, so maybe this hack is sufficient to fix the problem with name mangling that occurs with backslashes in filenames passed to "sh".
…lling By checking for the existence of external tools like sh, git, less (also wdiff, colordiff) we are trying to make tasty-silver more portable. (E.g. to Windows.)
Use the abstractions from System.Process to invoke a shell; should be more portable.
bfedae6
to
ad44d4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
I guess it currently returns an exit code of 0 if interactive mode updates a golden value automatically when there is no terminal. I would slightly prefer to return a non-0 exit code, but using interactive mode without a terminal is not really how it is intended to be used in the first place so I don't feel too strongly about that.
And I agree, bumping to version 3.3 is warranted due to the change in behavior.
Mmh, you have some point here. Maybe my design was too much influenced by my wish to test What we really want is to pass the The logic implemented in this PR is not good, I see this now. E.g., in Agda we run the CI in interactive mode with a non-interactive terminal, and we do not want that broken tests get automatically accepted. I wonder how to proceed this PR. Maybe it is best to take out the "accept if non-interactive terminal" logic and the respective self-test for now and otherwise merge the PR and release. |
Sounds good to me 👍 |
Automatically accepting tests in batch mode isn't a good idea, see: #31 (comment) So we revert to the previous behavior: interactive tests will fail if EOI is reached.
Pushed a commit that reverts back to the old logic for interactive mode (end-of-input means don't-update-golden-value). |
Bumped to 3.3. Release candidate at: https://hackage.haskell.org/package/tasty-silver-3.3/candidate |
007c825
to
e578bfe
Compare
Automatically accepting tests in batch mode isn't a good idea, see: #31 (comment) So we revert to the previous behavior: interactive tests will fail if EOI is reached.
Windows portability (fix #16).
See README and CHANGELOG for a high-level description of changes.
I am planning to release this as 3.3 (major version), since the logic of interactive running without
stdin
has changes (assumes "yes" now).