Commit 8ec77708 authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

testsuite: Add testcase for #13168

Thanks to Ryan Scott for the testcase.

Currently broken.
parent d8051c6c
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
SETUP=../Setup -v0
CONFIGURE=$(SETUP) configure --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db='$(PWD)/tmp.d' --prefix='$(PWD)/inst'
T13168: clean
$(MAKE) -s --no-print-directory clean
'$(GHC_PKG)' init tmp.d
'$(TEST_HC)' -v0 --make Setup
cd package1 && $(CONFIGURE) && $(SETUP) build && $(SETUP) copy && $(SETUP) register
cd package2 && $(CONFIGURE) && $(SETUP) build && $(SETUP) copy && $(SETUP) register
'$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -package-db tmp.d < T13168.script
clean :
$(RM) -r tmp.d inst dist Setup$(exeext)
import Distribution.Simple
main = defaultMain
:set -XPackageImports
import "package1" DuplicateModuleName
Window
Warning: -rtsopts and -with-rtsopts have no effect with -shared.
Call hs_init_ghc() from your main() function to set these options.
Warning: -rtsopts and -with-rtsopts have no effect with -shared.
Call hs_init_ghc() from your main() function to set these options.
test('T13168',
[extra_files(['package1', 'package2', 'Setup.hs']), expect_broken(13168)],
run_command,
['$MAKE -s --no-print-directory T13168'])
module DuplicateModuleName (Window(..)) where
data Window = Window deriving (Show)
name: package1
version: 0.1.0.0
license: BSD3
build-type: Simple
cabal-version: >=1.10
library
exposed-modules: DuplicateModuleName
build-depends: base >= 4.3 && < 5
default-language: Haskell2010
ghc-options: -Wall
module DuplicateModuleName (Window(..)) where
data Window = Window
name: package2
version: 0.1.0.0
license: BSD3
build-type: Simple
cabal-version: >=1.10
library
exposed-modules: DuplicateModuleName
build-depends: base >= 4.3 && < 5
default-language: Haskell2010
ghc-options: -Wall
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment