diff --git a/README.md b/README.md index 68790ac1..2bf48ee5 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/core/Test/Tasty/Patterns.hs b/core/Test/Tasty/Patterns.hs index 6689a967..e32ce350 100644 --- a/core/Test/Tasty/Patterns.hs +++ b/core/Test/Tasty/Patterns.hs @@ -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")