如何解决如何使用Cabal在ghcid中运行测试套件?
我在https://www.parsonsmatt.org/2018/05/19/ghcid_for_the_win.html中找到了有关在堆栈中执行此操作的参考,并在此处进行了一些提及:https://github.com/ndmitchell/ghcid/issues/128
我尝试过的事情:
[nix-shell:~/NewProjects/orgmode-parse]$ cabal v2-repl test
cabal: Cannot open a repl for the package test,it is not in this project
(either directly or indirectly). If you want to add it to the project then
edit the cabal.project file.
[nix-shell:~/NewProjects/orgmode-parse]$ cabal v2-repl Test.test
cabal: Unknown target 'Test.test'.
There is no component 'Test.test'.
[nix-shell:~/NewProjects/orgmode-parse]$ cabal v2-repl Test.test
cabal: Unknown target 'Test.test'.
There is no component 'Test.test'.
解决方法
ghcid --command='cabal v2-repl test:tests' --test 'Main.main'
tests
是在阴谋文件中定义的测试套件的名称。 Main.main
指的是Main
模块的main
函数。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。