Skip to content

Commit

Permalink
Add tests for missing ctypes
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Jan 2, 2025
1 parent 8c8a2de commit 81c2633
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
21 changes: 21 additions & 0 deletions cabal-testsuite/PackageTests/Target/cabal.missing-target.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# cabal clean
# cabal v2-target
Configuration is affected by the following files:
- cabal.project
Resolving dependencies...
Error: [Cabal-7127]
Cannot target the executables in the package c-0.1 because it does not contain any executables. Check the .cabal file for the package and make sure that it properly declares the components that you expect.
# cabal clean
# cabal v2-target
Configuration is affected by the following files:
- cabal.project
Resolving dependencies...
Error: [Cabal-7127]
Cannot target the test suites in the package c-0.1 because it does not contain any test suites. Check the .cabal file for the package and make sure that it properly declares the components that you expect.
# cabal clean
# cabal v2-target
Configuration is affected by the following files:
- cabal.project
Resolving dependencies...
Error: [Cabal-7127]
Cannot target the benchmarks in the package c-0.1 because it does not contain any benchmarks. Check the .cabal file for the package and make sure that it properly declares the components that you expect.
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 @@ -86,3 +86,11 @@ main = do
cabal "v2-target" ["a:tests"]
cabal "clean" []
cabal "v2-target" ["a:benches"]

cabalTest' "missing-target" $ do
cabal "clean" []
fails $ cabal "v2-target" ["c:exes"]
cabal "clean" []
fails $ cabal "v2-target" ["c:tests"]
cabal "clean" []
fails $ cabal "v2-target" ["c:benches"]

0 comments on commit 81c2633

Please sign in to comment.