背景
我正在 Haskell 中构建一个日志文件解析器。我正在使用堆栈来构建它。运行stack build
命令很愉快,我的项目编译。stack test
但是,运行会产生以下错误:
parser-test: executable not found
我在错误消息上方看到以下警告,但我不知道如何避免它所指的重定向。
Warning: output was redirected with -o, but no output will be generated because there is no Main module.
相关文件
我还没有编写任何测试,所以测试文件是由stack new
. 我的 cabal 文件如下所示:
...
category: Executable
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
library
hs-source-dirs: src
exposed-modules: LogParser
build-depends: base >= 4.7 && < 5
, attoparsec
, bytestring
, old-locale
, time
default-language: Haskell2010
executable parser-exe
hs-source-dirs: app
main-is: Main.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends: base
, attoparsec
, bytestring
, old-locale
, time
, parser
default-language: Haskell2010
test-suite parser-test
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: base
, attoparsec
, bytestring
, hspec
, hspec-attoparsec
, old-locale
, time
, parser
ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010
source-repository head
type: git
...
我想我遗漏了一些东西,但我找不到我遗漏的东西记录在哪里。
期望的行为
我应该看到堆栈文档Test suite not yet implemented
中概述的消息。