-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
cabal-testsuite/PackageTests/ConfigureComponent/MissingOrPrivate/Lib.cabal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
2 changes: 2 additions & 0 deletions
2
cabal-testsuite/PackageTests/ConfigureComponent/MissingOrPrivate/Lib.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module Lib where | ||
lib = "OK" |
2 changes: 2 additions & 0 deletions
2
cabal-testsuite/PackageTests/ConfigureComponent/MissingOrPrivate/exe/Exe.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import Lib | ||
main = putStrLn lib |
16 changes: 16 additions & 0 deletions
16
cabal-testsuite/PackageTests/ConfigureComponent/MissingOrPrivate/setup-fail.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Setup configure | ||
Configuring library 'foo-internal' for Lib-0.1.0.0... | ||
# Setup build | ||
Preprocessing library 'foo-internal' for Lib-0.1.0.0... | ||
Building library 'foo-internal' for Lib-0.1.0.0... | ||
# Setup copy | ||
Installing internal library foo-internal in <PATH> | ||
# Setup register | ||
Registering library 'foo-internal' for Lib-0.1.0.0... | ||
# Setup configure | ||
Configuring executable 'exe' for Lib-0.1.0.0... | ||
Error: [Cabal-8010] | ||
Encountered missing or private dependencies: | ||
Lib:{bar-internal,foo-internal} (missing :bar-internal), | ||
base <=1.0 (installed: <VERSION>), | ||
package-that-does-not-exist (missing) |
8 changes: 8 additions & 0 deletions
8
cabal-testsuite/PackageTests/ConfigureComponent/MissingOrPrivate/setup-fail.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters