Skip to content

Commit

Permalink
Add test-case for show-casing issue #7395
Browse files Browse the repository at this point in the history
  • Loading branch information
fendor committed Nov 13, 2021
1 parent 6fbc2a7 commit 6b5cf63
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module Main where

main :: IO ()
main = putStrLn "Hello, Haskell!"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages: multiple-cabal-files.cabal multiple-cabal-files2.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cabal-version: 2.4
name: multiple-cabal-files
version: 0.1.0.0

executable exe
main-is: Main.hs

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cabal-version: 2.4
name: multiple-cabal-files
version: 0.1.0.0

executable exe
main-is: Main.hs

4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/Ambiguity/setup-cabal-file.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# cabal v2-build
Error: cabal: Multiple packages have been found:
multiple-cabal-files-0.1.0.0 defined in: ./multiple-cabal-files.cabal
multiple-cabal-files-0.1.0.0 defined in: ./multiple-cabal-files2.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Test.Cabal.Prelude
-- Test that we can resolve a module name ambiguity when reexporting
-- by explicitly specifying what package we want.
main = cabalTest $ withDirectory "multiple-cabal-files" $
fails $ cabal "v2-build" []

0 comments on commit 6b5cf63

Please sign in to comment.