'How to test specific hSpec property using `--match` and cabal
I have a bunch of test modules and I can run a specific one using cabal test.
cabal test Module.Name.Here
The module contains many tests and one of them fails and it gives the following message.
To rerun use: --match "/Module.Name.Here/hspecDescribeString/hspecPropName/"
How do I use this match string? I've tried various combinations none of them works 😞. I've also looked at cabal test --help
it does not mention --match
flag anywhere.
cabal test Module.Name.Here --match rest-of-the-match-string
cabal test Module.Name.Here -- --match rest-of-the-match-string
cabal test match-string
cabal test -- match-string
Any help is much appreciated.
Solution 1:[1]
Run it like this:
cabal test —test-options=—match=/Module.Name.Here/hspecDescribeString/hspecPropName/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Abhinav Sarkar |