在cabal文件中放置测试的命令行参数? [英] put command line arguments for tests in cabal file?

查看:76
本文介绍了在cabal文件中放置测试的命令行参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在cabal文件中为测试编写命令行参数(exitcode-stdio-1.0)?

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

我可以用
$ b

I can run the tests manually with

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

但我不想(重新)输入。

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

推荐答案

没有办法做到这一点。正如评论所暗示的,如果测试套件有默认选项,那么它们应该被烘焙到可执行文件中。命令行选项仅用于覆盖或修改这些默认选项。无法在cabal文件中添加其他选项

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

这篇关于在cabal文件中放置测试的命令行参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆