put command line arguments for tests in cabal file?

半世苍凉 提交于 2019-12-01 15:08:06

问题


Is there a way to write command line arguments for tests (exitcode-stdio-1.0) in the cabal file?

I can run the tests manually with

cabal test --test-options="foo bar"

but I don't want to (re-)type this.


回答1:


There is no way to do this. As the comments suggest, if there are default options for the test-suite, they should just be baked into the executable. Command line options are intended only for overriding or modifying those default options. There is no way to add additional options in the cabal file



来源:https://stackoverflow.com/questions/28902169/put-command-line-arguments-for-tests-in-cabal-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!