Skip to content

Fix directory handling with --no-module-suffix

decentral1se requested to merge mkscrg:dont-open-dirs into master

Created by: mkscrg

When --no-module-suffix is set, findTests tries to read everything in the test directory as a file. It breaks if you have subdirectories of test modules. E.g. when I add -optF --no-module-suffix to this repo's test/Tasty.hs, then stack test:

Preprocessing test suite 'test' for tasty-discover-3.0.0...
tasty-discover: test/SubMod: openFile: inappropriate type (is a directory)
`tasty-discover' failed in phase `Haskell pre-processor'. (Exit code: 1)

This PR drops the special handing of --no-module-suffix, instead using "" as the target suffix when that option is set.

Merge request reports