如何使用 cabal 运行 在 ghcid 中测试套件?
How to run test suite in ghcid with cabal?
我在 https://www.parsonsmatt.org/2018/05/19/ghcid_for_the_win.html and some mention of it here: 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
是 cabal 文件中定义的 test-suite 的名称。而Main.main
指的是Main
模块的main
函数。
我在 https://www.parsonsmatt.org/2018/05/19/ghcid_for_the_win.html and some mention of it here: 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
是 cabal 文件中定义的 test-suite 的名称。而Main.main
指的是Main
模块的main
函数。