From 18aa52be466591629431ca43c16b650bbfc2f448 Mon Sep 17 00:00:00 2001
From: Oleg Grenrus <oleg.grenrus@iki.fi>
Date: Sun, 24 May 2020 11:36:10 +0300
Subject: [PATCH] Add test for #6038

---
 .../PackageTests/MultipleLibraries/Successful/cabal.out    | 2 +-
 .../MultipleLibraries/Successful/pkg-def/pkg-def.cabal     | 7 ++-----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/cabal-testsuite/PackageTests/MultipleLibraries/Successful/cabal.out b/cabal-testsuite/PackageTests/MultipleLibraries/Successful/cabal.out
index d40e62c30a..71c776d023 100644
--- a/cabal-testsuite/PackageTests/MultipleLibraries/Successful/cabal.out
+++ b/cabal-testsuite/PackageTests/MultipleLibraries/Successful/cabal.out
@@ -4,7 +4,7 @@ Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
  - pkg-def-0.1.0.0 (lib:publib) (first run)
  - pkg-abc-0.1.0.0 (exe:program) (first run)
-Warning: pkg-def.cabal:13:27: visibility is experimental feature (issue #5660)
+Warning: pkg-def.cabal:10:27: visibility is experimental feature (issue #5660)
 Configuring library 'publib' for pkg-def-0.1.0.0..
 Preprocessing library 'publib' for pkg-def-0.1.0.0..
 Building library 'publib' for pkg-def-0.1.0.0..
diff --git a/cabal-testsuite/PackageTests/MultipleLibraries/Successful/pkg-def/pkg-def.cabal b/cabal-testsuite/PackageTests/MultipleLibraries/Successful/pkg-def/pkg-def.cabal
index a4d95cf4a0..8e12690eb5 100644
--- a/cabal-testsuite/PackageTests/MultipleLibraries/Successful/pkg-def/pkg-def.cabal
+++ b/cabal-testsuite/PackageTests/MultipleLibraries/Successful/pkg-def/pkg-def.cabal
@@ -2,11 +2,8 @@ cabal-version: 3.0
 name:          pkg-def
 version:       0.1.0.0
 
-library
-  default-language: Haskell2010
-  hs-source-dirs:   src
-  build-depends:    base
-  exposed-modules:  PkgDef
+-- there was public library. But we shouldn't need one.
+-- https://github.com/haskell/cabal/issues/6038
 
 library publib
   default-language: Haskell2010
-- 
GitLab