MaxGabriel
MaxGabriel

Reputation: 7707

How can I pass test-options with cabal new-test?

In the old cabal, you could pass test options like --color and --match=name by doing cabal test --test-option=--color --test-option=--match=name. Can this be done with cabal new-test? I don't see a --test-option in the help output of cabal new-test --help.

Upvotes: 6

Views: 811

Answers (1)

Joachim Breitner
Joachim Breitner

Reputation: 25763

No, it is not possible, presumably because new-test runs all test suites, so it is unclear which test to pass it to.

But new versions of cabal tell you in the help for new-test:

To pass command-line arguments to a test suite, see the new-run command.

so that is now the way to run a single test suite with options.

Upvotes: 3

Related Questions