Skip to content

Commit

Permalink
Add tests of all:exes and all:tests
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Jan 2, 2025
1 parent 3051c6e commit 0e5df5d
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 6 deletions.
8 changes: 8 additions & 0 deletions cabal-testsuite/PackageTests/Target/cabal.all-exes.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# cabal clean
# cabal v2-target
Configuration is affected by the following files:
- cabal.project
Resolving dependencies...
Fully qualified target forms:
- a:exe:a-exe
- b:exe:b-exe
8 changes: 8 additions & 0 deletions cabal-testsuite/PackageTests/Target/cabal.all-tests.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# cabal clean
# cabal v2-target
Configuration is affected by the following files:
- cabal.project
Resolving dependencies...
Fully qualified target forms:
- a:test:a-test
- b:test:b-test
4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/Target/cabal.default-all.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ Configuration is affected by the following files:
- cabal.project
Resolving dependencies...
Fully qualified target forms:
- a:exe:a-exe
- a:lib:a
- a:lib:a-sublib
- b:exe:b-exe
- b:lib:b
- b:lib:b-sublib
4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/Target/cabal.explicit-all.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ Configuration is affected by the following files:
- cabal.project
Resolving dependencies...
Fully qualified target forms:
- a:exe:a-exe
- a:lib:a
- a:lib:a-sublib
- b:exe:b-exe
- b:lib:b
- b:lib:b-sublib
8 changes: 8 additions & 0 deletions cabal-testsuite/PackageTests/Target/cabal.test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@ main = do
cabalTest' "explicit-all" $ do
cabal "clean" []
cabal "v2-target" ["all"]

cabalTest' "all-exes" $ do
cabal "clean" []
cabal "v2-target" ["all:exes"]

cabalTest' "all-tests" $ do
cabal "clean" []
cabal "v2-target" ["all:tests"]
9 changes: 6 additions & 3 deletions cabal-testsuite/PackageTests/Target/dir-a/a.cabal
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: a
version: 0.1
license: BSD3
cabal-version: >= 1.2
cabal-version: >= 1.8
build-type: Simple

library
exposed-modules: Foo
build-depends: base
library a-sublib
executable a-exe
test-suite a-test
type: exitcode-stdio-1.0
main-is: Test.hs
9 changes: 6 additions & 3 deletions cabal-testsuite/PackageTests/Target/dir-b/b.cabal
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: b
version: 0.1
license: BSD3
cabal-version: >= 1.2
cabal-version: >= 1.8
build-type: Simple

library
exposed-modules: Foo
build-depends: base
library b-sublib
executable b-exe
test-suite b-test
type: exitcode-stdio-1.0
main-is: Test.hs

0 comments on commit 0e5df5d

Please sign in to comment.