Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
6059c6b3
Commit
6059c6b3
authored
Jul 14, 2016
by
Edward Z. Yang
Browse files
Add more reexported module tests
Signed-off-by:
Edward Z. Yang
<
ezyang@cs.stanford.edu
>
parent
d32d1458
Changes
7
Hide whitespace changes
Inline
Side-by-side
Cabal/Cabal.cabal
View file @
6059c6b3
...
...
@@ -207,6 +207,11 @@ extra-source-files:
tests/PackageTests/PreProcessExtraSources/Foo.hsc
tests/PackageTests/PreProcessExtraSources/Main.hs
tests/PackageTests/PreProcessExtraSources/my.cabal
tests/PackageTests/ReexportedModules/containers-dupe/Data/Map.hs
tests/PackageTests/ReexportedModules/containers-dupe/containers-dupe.cabal
tests/PackageTests/ReexportedModules/p/fail-ambiguous.cabal
tests/PackageTests/ReexportedModules/p/fail-missing.cabal
tests/PackageTests/ReexportedModules/p/fail-other.cabal
tests/PackageTests/ReexportedModules/p/p.cabal
tests/PackageTests/ReexportedModules/q/A.hs
tests/PackageTests/ReexportedModules/q/q.cabal
...
...
Cabal/tests/PackageTests/ReexportedModules/containers-dupe/Data/Map.hs
0 → 100644
View file @
6059c6b3
module
Data.Map
where
conflict
=
True
Cabal/tests/PackageTests/ReexportedModules/containers-dupe/containers-dupe.cabal
0 → 100644
View file @
6059c6b3
name: containers-dupe
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.10
library
exposed-modules: Data.Map
build-depends: base
default-language: Haskell2010
Cabal/tests/PackageTests/ReexportedModules/p/fail-ambiguous.cabal
0 → 100644
View file @
6059c6b3
name: p
version: 0.1.0.0
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.21
library
build-depends: base, containers, containers-dupe
reexported-modules: Data.Map as Map
Cabal/tests/PackageTests/ReexportedModules/p/fail-missing.cabal
0 → 100644
View file @
6059c6b3
name: p
version: 0.1.0.0
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.21
library
build-depends: base
reexported-modules: Missing as Foobar
Cabal/tests/PackageTests/ReexportedModules/p/fail-other.cabal
0 → 100644
View file @
6059c6b3
name: p
version: 0.1.0.0
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.21
library
exposed-modules: Public
other-modules: Private
build-depends: base
reexported-modules: Private as Reprivate
Cabal/tests/PackageTests/Tests.hs
View file @
6059c6b3
...
...
@@ -206,11 +206,25 @@ tests config = do
tc
"OrderFlags"
$
cabal_build
[]
-- Test that reexported modules build correctly
tc
"ReexportedModules"
.
whenGhcVersion
(
>=
mkVersion
[
7
,
9
])
$
do
tc
s
"ReexportedModules"
"p"
.
whenGhcVersion
(
>=
mkVersion
[
7
,
9
])
$
do
withPackageDb
$
do
withPackage
"p"
$
cabal_install
[]
withPackage
"p"
$
cabal_install
[
"--cabal-file"
,
"p.cabal"
]
withPackage
"q"
$
do
cabal_build
[]
tcs
"ReexportedModules"
"fail-other"
.
whenGhcVersion
(
>=
Version
[
7
,
9
]
[]
)
$
do
withPackage
"p"
$
do
r
<-
shouldFail
$
cabal'
"configure"
[
"--cabal-file"
,
"fail-other.cabal"
]
assertOutputContains
"Private"
r
tcs
"ReexportedModules"
"fail-ambiguous"
.
whenGhcVersion
(
>=
Version
[
7
,
9
]
[]
)
$
do
withPackageDb
$
do
withPackage
"containers-dupe"
$
cabal_install
[]
withPackage
"p"
$
do
r
<-
shouldFail
$
cabal'
"configure"
[
"--cabal-file"
,
"fail-ambiguous.cabal"
]
assertOutputContains
"Data.Map"
r
tcs
"ReexportedModules"
"fail-missing"
.
whenGhcVersion
(
>=
Version
[
7
,
9
]
[]
)
$
do
withPackage
"p"
$
do
r
<-
shouldFail
$
cabal'
"configure"
[
"--cabal-file"
,
"fail-missing.cabal"
]
assertOutputContains
"Missing"
r
-- Test that Cabal computes different IPIDs when the source changes.
tc
"UniqueIPID"
.
withPackageDb
$
do
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment