Skip to content

Commit

Permalink
Add woops test
Browse files Browse the repository at this point in the history
- Regen expected output without duplication
  • Loading branch information
philderbeast committed Nov 13, 2024
1 parent 0e769c3 commit 189362a
Show file tree
Hide file tree
Showing 2 changed files with 279 additions and 0 deletions.
276 changes: 276 additions & 0 deletions cabal-testsuite/PackageTests/ConditionalAndImport/cabal.out
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,282 @@ Configuration is affected by the following files:
imported by: yops/yops-1.config
imported by: yops-0.project
Up to date
# checking if we detect when the same config is imported via many different paths (we don't)
# cabal v2-build
Configuration is affected by the following files:
- woops-0.project
- woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- woops-4.config
imported by: woops/woops-3.config
imported by: woops-0.project
- woops-4.config
imported by: woops/woops-3.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- woops-6.config
imported by: woops/woops-5.config
imported by: woops-0.project
- woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-0.project
- woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- woops-8.config
imported by: woops/woops-7.config
imported by: woops-0.project
- woops-8.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-0.project
- woops-8.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-0.project
- woops-8.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- woops/woops-1.config
imported by: woops-0.project
- woops/woops-3.config
imported by: woops-0.project
- woops/woops-3.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- woops/woops-5.config
imported by: woops-0.project
- woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-0.project
- woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- woops/woops-7.config
imported by: woops-0.project
- woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-0.project
- woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-0.project
- woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- woops/woops-9.config
imported by: woops-0.project
- woops/woops-9.config
imported by: woops-8.config
imported by: woops/woops-7.config
imported by: woops-0.project
- woops/woops-9.config
imported by: woops-8.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-0.project
- woops/woops-9.config
imported by: woops-8.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-0.project
- woops/woops-9.config
imported by: woops-8.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops-8.config
imported by: woops/woops-7.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops-8.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops-8.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops-8.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-1.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-3.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-3.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-5.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-7.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-9.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-9.config
imported by: woops-8.config
imported by: woops/woops-7.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-9.config
imported by: woops-8.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-9.config
imported by: woops-8.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-0.project
- https://www.stackage.org/lts-21.25/cabal.config
imported by: woops/woops-9.config
imported by: woops-8.config
imported by: woops/woops-7.config
imported by: woops-6.config
imported by: woops/woops-5.config
imported by: woops-4.config
imported by: woops/woops-3.config
imported by: woops-2.config
imported by: woops/woops-1.config
imported by: woops-0.project
Resolving dependencies...
Build profile: -w ghc-9.4.8 -O1
In order, the following will be built:
- my-0.1 (lib:my) (first run)
Configuring my-0.1...
Preprocessing library for my-0.1...
Building library for my-0.1...
# checking bad conditional
# cabal v2-build
Error: [Cabal-7090]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ main = cabalTest . withRepo "repo" . recordMode RecordMarked $ do
log "checking if we detect when the same config is imported via many different paths (we don't)"
yopping <- cabal' "v2-build" [ "--project-file=yops-0.project" ]

log "checking if we detect when the same config is imported via many different paths (we don't)"
woopping <- cabal' "v2-build" [ "--project-file=woops-0.project" ]

log "checking bad conditional"
badIf <- fails $ cabal' "v2-build" [ "--project-file=bad-conditional.project" ]
assertOutputContains "Cannot set compiler in a conditional clause of a cabal project file" badIf
Expand Down

0 comments on commit 189362a

Please sign in to comment.