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

Mention the proper env vars for usage in MinGW #404

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -820,9 +820,12 @@ Use `sequentialTestGroup` to mitigate these problems.

3. **Q**: Patterns with slashes do not work on Windows. How can I fix it?

**A**: If you are running Git for Windows terminal, it has a habit of converting slashes
to backslashes. Set `MSYS_NO_PATHCONV=1` to prevent this behaviour, or follow other
suggestions from [Known Issues](https://github.com/git-for-windows/build-extra/blob/main/ReleaseNotes.md#known-issues).
**A**: If you are running Git for Windows terminal, it has a habit of
converting slashes to backslashes. Set `MSYS_NO_PATHCONV=1` when running the
Git for Windows terminal and `MSYS2_ARG_CONV_EXCL=*` when running a MinGW
bash directly to prevent this behaviour, or follow other suggestions from
[Known
Issues](https://github.com/git-for-windows/build-extra/blob/main/ReleaseNotes.md#known-issues).

## Press

Expand Down
10 changes: 9 additions & 1 deletion core/Test/Tasty/Patterns.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ instance IsOption TestPattern where
defaultValue = noPattern
parseValue = parseTestPattern
optionName = return "pattern"
optionHelp = return "Select only tests which satisfy a pattern or awk expression"
#if !defined(mingw32_HOST_OS)
optionHelp = return "Select only tests which satisfy a pattern or awk expression."
#else
optionHelp = return
$ unwords [ "Select only tests which satisfy a pattern or awk expression."
, "Consider using `MSYS_NO_PATHCONV=1` or `MSYS2_ARG_CONV_EXCL=*`"
, "to prevent pattern mangling."
]
#endif
optionCLParser =
fmap (TestPattern . fmap (foldr1 And) . nonEmpty . catMaybes . coerce @[TestPattern]) . some $
mkOptionCLParser (short 'p' <> metavar "PATTERN")
Expand Down
Loading