tomjaguarpaw / tilapia

Improving all Haskell's programmer interfaces
65 stars 2 forks source link

Cabal silently ignores test stanzas if there's a colon #90

Open tomjaguarpaw opened 3 years ago

tomjaguarpaw commented 3 years ago

If you accidentally write test-suite: test instead of test-suite test then cabal silently ignores your test suite.

$ cabal v2-test
No tests to run for the package no-colon-0

no-colon.cabal:

cabal-version:       3.0

name:                no-colon
version:             0

executable no-colon
  main-is:             Main.hs
  build-depends:       base
  default-language:    Haskell2010

test-suite: test
  default-language: Haskell2010
  type: exitcode-stdio-1.0
  main-is: Main.hs
  hs-source-dirs: test
  build-depends: base

test/Main.hs:

module Main where

main = pure ()

app/Main.hs

module Main where

main = pure ()