-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65f3bf3
commit b9dac5a
Showing
17 changed files
with
47 additions
and
371 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
cabal-testsuite/PackageTests/ConditionalAndImport/DedupUsingConfigFrom/cabal.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# checking "using config from message" with URI imports | ||
# cabal v2-build |
38 changes: 38 additions & 0 deletions
38
cabal-testsuite/PackageTests/ConditionalAndImport/DedupUsingConfigFrom/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest . recordMode RecordMarked $ do | ||
let log = recordHeader . pure | ||
|
||
log "checking \"using config from message\" with URI imports" | ||
woopping <- fails $ cabal' "v2-build" [ "--dry-run", "--project-file=woops-0-packages-in-woops.project" ] | ||
|
||
-- Use assertRegex when the output is tainted by the temp directory, like | ||
-- this: | ||
-- | ||
-- When using configuration from: | ||
-- - /tmp/cabal-testsuite-282695/woops-0.project | ||
-- - /tmp/cabal-testsuite-282695/woops-2.config etc | ||
assertRegex | ||
"Project configuration with URI imports is listed in full" | ||
"When using configuration from:(\n|\r\n) \ | ||
\ .*woops-0-packages-in-woops\\.project(\n|\r\n) \ | ||
\ .*with-ghc\\.config(\n|\r\n) \ | ||
\ .*woops-0\\.config(\n|\r\n) \ | ||
\ .*woops-2\\.config(\n|\r\n) \ | ||
\ .*woops-4\\.config(\n|\r\n) \ | ||
\ .*woops-6\\.config(\n|\r\n) \ | ||
\ .*woops-8\\.config(\n|\r\n) \ | ||
\ .*woops-1\\.config(\n|\r\n) \ | ||
\ .*woops-3\\.config(\n|\r\n) \ | ||
\ .*woops-5\\.config(\n|\r\n) \ | ||
\ .*woops-7\\.config(\n|\r\n) \ | ||
\ .*woops-9\\.config(\n|\r\n) \ | ||
\ .*https://www.stackage.org/lts-21.25/cabal.config(\n|\r\n)" | ||
woopping | ||
|
||
assertOutputContains | ||
"The following errors occurred: \ | ||
\ - The package directory 'woops' does not contain any .cabal file." | ||
woopping | ||
|
||
return () |
7 changes: 7 additions & 0 deletions
7
cabal-testsuite/PackageTests/ConditionalAndImport/DedupUsingConfigFrom/with-ghc.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- WARNING: Override the `with-compiler: ghc-x.y.z` of the stackage import, of | ||
-- https://www.stackage.org/nightly-yyyy-mm-dd/cabal.config. Otherwise tests | ||
-- will fail with: | ||
-- -Error: [Cabal-5490] | ||
-- -Cannot find the program 'ghc'. User-specified path 'ghc-x.y.z' does not | ||
-- refer to an executable and the program is not on the system path. | ||
with-compiler: ghc |
File renamed without changes.
2 changes: 0 additions & 2 deletions
2
...Tests/ConditionalAndImport/woops-0.config → ...mport/DedupUsingConfigFrom/woops-0.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
packages: . | ||
|
||
import: woops/woops-1.config | ||
import: woops/woops-3.config | ||
import: woops/woops-5.config | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.