Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
9999years committed Sep 23, 2024
1 parent a268772 commit 063b848
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
cabal-version: 3.0
name: Lib
version: 0.1.0.0
license: BSD-3-Clause
author: Edward Z. Yang
maintainer: [email protected]
build-type: Simple

library foo-internal
build-depends: base
exposed-modules: Lib
default-language: Haskell2010

executable exe
main-is: Exe.hs
build-depends: base <=1.0,
package-that-does-not-exist,
Lib:{foo-internal, bar-internal},
hs-source-dirs: exe
default-language: Haskell2010
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module Lib where
lib = "OK"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Lib
main = putStrLn lib
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

import Test.Cabal.Prelude
main = setupTest $ do
withPackageDb $ do
base_id <- getIPID "base"
setup_install ["foo-internal", "--cid", "foo-internal-0.1-abc"]
r <- fails $ setup' "configure" [ "exe" ]
assertOutputContains "Lib" r
1 change: 1 addition & 0 deletions cabal-testsuite/src/Test/Cabal/OutputNormalizer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ normalizeOutput nenv =
. maybe id normalizePathCmdOutput (normalizerCabalInstallVersion nenv)
-- hackage-security locks occur non-deterministically
. resub "(Released|Acquired|Waiting) .*hackage-security-lock\n" ""
. resub "installed: [0-9]+(\\.[0-9]+)*" "installed: <VERSION>"
where
sameDir = "(\\.((\\\\)+|\\/))*"
packageIdRegex pid =
Expand Down

0 comments on commit 063b848

Please sign in to comment.