Cabal 的新手,很抱歉,如果這很明顯,但我顯然希望在我的 Cabal 專案的測驗套件中有多個檔案,但該.cabal檔案堅持要被賦予一個入口點。我為此付出什么?
例如,如果我的庫中有兩個模塊,并且想在各自的測驗檔案中測驗每個模塊。一個并不比另一個重要,那么我該如何將其中一個檔案作為入口點呢?
uj5u.com熱心網友回復:
您可以制作兩個測驗套件。
test-suite A
main-is: test-module-A.hs
test-suite B
main-is: test-module-B.hs
或者您可以制作一個匯入兩個測驗模塊的套件。
test-suite both
main-is: test-both.hs
other-modules: TestA, TestB
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/517170.html
標籤:哈斯克尔测试阴谋阴谋安装
