Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
c0d4e935
Commit
c0d4e935
authored
Jul 27, 2006
by
Simon Marlow
Browse files
test fixes and new tests for package support
parent
425c4fb5
Changes
6
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/cabal/Makefile
View file @
c0d4e935
...
...
@@ -50,9 +50,8 @@ ghcpkg03 :
$(GHC_PKG)
register
--force
test2.pkg
@
:
#
test4.pkg depends on testpkg-2.0
,
which conflicts with testpkg-1.2.3.4
,
@
:
# so ghc-pkg will refuse to install it when registering, and hide
@
:
# testpkg-1.2.3.4 when updating.
if
$(GHC_PKG)
register test4.pkg
;
then
false
;
else
true
;
fi
@
:
# ghc-pkg will happily register it now
(
it didn
't in GHC 6.4)
$(GHC_PKG)
register test4.pkg
$(GHC_PKG)
update test4.pkg
@
:
#
and another update of test.pkg will now hide dep-2.0
...
...
testsuite/tests/ghc-regress/cabal/all.T
View file @
c0d4e935
...
...
@@ -5,5 +5,6 @@ test('ghcpkg02', skip_if_fast, run_command_ignore_output, ['$MAKE ghcpkg02'])
test
('
ghcpkg03
',
normal
,
run_command_ignore_output
,
['
$MAKE ghcpkg03
'])
test
('
ghcpkg04
',
normal
,
run_command
,
['
$MAKE --no-print-directory ghcpkg04
'])
# Test that we can't compile a module that also belongs to a package
test
('
pkg01
',
normal
,
compile_fail
,
[''])
# Test that we *can* compile a module that also belongs to a package
# (this was disallowed in GHC 6.4 and earlier)
test
('
pkg01
',
normal
,
compile
,
[''])
testsuite/tests/ghc-regress/cabal/ghcpkg04.stderr
View file @
c0d4e935
...
...
@@ -2,4 +2,4 @@
ghcpkg04.hs:1:0:
Failed to load interface for `A':
Cannot import `A':
it was found in multiple packages: testpkg-1.2.3.4
newtestpkg-2.0
it was found in multiple packages:
newtestpkg-2.0
testpkg-1.2.3.4
testsuite/tests/ghc-regress/cabal/pkg01.stderr
View file @
c0d4e935
pkg01.hs:1:0:
conflict: module `Char' belongs to the current program/library
and also to package haskell98-1.0
testsuite/tests/ghc-regress/cabal/pkg02/all.T
View file @
c0d4e935
# We can compile Network on its own (pkg02_a), but as soon as we
# compile a module that depends on something in the network package,
# we get a conflict (pkg02_b).
# We can compile Network on its own (pkg02_a)
test
('
pkg02_a
',
only_ways
(['
normal
']),
multimod_compile
,
['
Network
','
-v0
'])
test
('
pkg02_b
',
normal
,
multimod_compile
_fail
,
['
A
','
-v0
'])
test
('
pkg02_b
',
normal
,
multimod_compile
,
['
A
','
-v0
'])
clean_o_hi
()
testsuite/tests/ghc-regress/cabal/pkg02/pkg02_b.stderr
View file @
c0d4e935
A.hs:1:0:
conflict: module `Network' belongs to the current program/library
and also to package network-1.0
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