Skip to content

Commit 9da6cf3

Browse files
committed
Add a one.project one pkg test
1 parent e9decce commit 9da6cf3

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

cabal-testsuite/PackageTests/ReplProjectTarget/cabal.out

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,17 @@ Error: [Cabal-7076]
3434
There are no packages in 'empty.project'. Please add a package to the project and pick a single [package:][ctype:]component as target for the REPL command.
3535
# checking repl command with a missing 'missing.project'
3636
# cabal repl
37+
# checking repl command with a single package in 'one.project'
38+
# cabal repl
39+
Configuration is affected by the following files:
40+
- one.project
41+
Resolving dependencies...
42+
Build profile: -w ghc-<GHCVER> -O1
43+
In order, the following will be built:
44+
- pkg-one-0.1 (interactive) (first run)
45+
Configuring pkg-one-0.1...
46+
Preprocessing library for pkg-one-0.1...
47+
Error: [Cabal-7554]
48+
can't find source for Foo in ., <ROOT>/cabal.dist/work/./dist/build/<ARCH>/ghc-<GHCVER>/pkg-one-0.1/build/autogen, <ROOT>/cabal.dist/work/./dist/build/<ARCH>/ghc-<GHCVER>/pkg-one-0.1/build/global-autogen
49+
Error: [Cabal-7125]
50+
repl failed for pkg-one-0.1-inplace.

cabal-testsuite/PackageTests/ReplProjectTarget/cabal.test.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,9 @@ main = cabalTest . recordMode RecordMarked $ do
3232
missing <- fails $ cabal' "repl" [ "--project-file=missing.project" ]
3333
assertOutputContains "The given project file 'missing.project' does not exist." missing
3434

35+
log "checking repl command with a single package in 'one.project'"
36+
one <- fails $ cabal' "repl" [ "--project-file=one.project" ]
37+
assertOutputContains "In order, the following will be built" one
38+
assertOutputContains "pkg-one-0.1 (interactive) (first run)" one
39+
3540
return ()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
packages: pkg-one

0 commit comments

Comments
 (0)