Skip to content

Commit

Permalink
Remove an additional test on yops project
Browse files Browse the repository at this point in the history
- checking "using config from message" without URI imports
  • Loading branch information
philderbeast committed Dec 12, 2024
1 parent d7c0025 commit 79ae92d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 37 deletions.
2 changes: 0 additions & 2 deletions cabal-testsuite/PackageTests/ConditionalAndImport/cabal.out
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,6 @@ Configuration is affected by the following files:
imported by: yops/yops-1.config
imported by: yops-0.project
Up to date
# checking "using config from message" without URI imports
# cabal v2-build
# checking bad conditional
# cabal v2-build
Error: [Cabal-7090]
Expand Down
35 changes: 0 additions & 35 deletions cabal-testsuite/PackageTests/ConditionalAndImport/cabal.test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -258,41 +258,6 @@ 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 \"using config from message\" without URI imports"
withDirectory "yops" $ do
yopping <- fails $ cabal' "v2-build" [ "--dry-run", "--project-file=../yops-0.project" ]

-- Use assertRegex when the output is tainted by the temp directory, like
-- this:
--
-- When using configuration from:
-- - /tmp/cabal-testsuite-286573/yops-0.project
-- - /tmp/cabal-testsuite-286573/yops-2.config etc
--
-- The addition of the /tmp/cabal-testsuite-*/ prefix, I observed on Ubuntu
-- but not on Windows.
assertRegex
"Project configuration without URI imports is listed in full"
"When using configuration from:(\n|\r\n) \
\ .*yops-0\\.project(\n|\r\n) \
\ .*yops-2\\.config(\n|\r\n) \
\ .*yops-4\\.config(\n|\r\n) \
\ .*yops-6\\.config(\n|\r\n) \
\ .*yops-8\\.config(\n|\r\n) \
\ .*yops-1\\.config(\n|\r\n) \
\ .*yops-3\\.config(\n|\r\n) \
\ .*yops-5\\.config(\n|\r\n) \
\ .*yops-7\\.config(\n|\r\n) \
\ .*yops-9\\.config(\n|\r\n)"
yopping

assertOutputContains
"The following errors occurred: \
\ - The package directory '.' does not contain any .cabal file."
yopping

return ()

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 79ae92d

Please sign in to comment.