Skip to content

Commit

Permalink
Simplify the project file names
Browse files Browse the repository at this point in the history
- Can be done now that the test is in its own folder
  • Loading branch information
philderbeast committed Dec 12, 2024
1 parent 4ab4537 commit 70a2369
Show file tree
Hide file tree
Showing 21 changed files with 52 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import: cfg/1.config
import: cfg/3.config
import: cfg/5.config
import: cfg/7.config
import: cfg/9.config

import: with-ghc.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import: ../woops-2.config
import: cfg/3.config
import: https://www.stackage.org/lts-21.25/cabal.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import: ../woops-4.config
import: cfg/5.config
import: https://www.stackage.org/lts-21.25/cabal.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import: ../woops-6.config
import: cfg/7.config
import: https://www.stackage.org/lts-21.25/cabal.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import: ../woops-8.config
import: cfg/9.config
import: https://www.stackage.org/lts-21.25/cabal.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# checking "using config from message" with URI imports
# cabal v2-build
# checking that package directories and locations are reported in order
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,39 @@ 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" ]
out <- fails $ cabal' "v2-build" [ "all", "--dry-run", "--project-file=no-pkgs.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
-- - /tmp/cabal-testsuite-282695/cabal.project
-- - /tmp/cabal-testsuite-282695/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) \
\ .*no-pkgs\\.project(\n|\r\n) \
\ .*0\\.config(\n|\r\n) \
\ .*2\\.config(\n|\r\n) \
\ .*4\\.config(\n|\r\n) \
\ .*6\\.config(\n|\r\n) \
\ .*8\\.config(\n|\r\n) \
\ .*1\\.config(\n|\r\n) \
\ .*3\\.config(\n|\r\n) \
\ .*5\\.config(\n|\r\n) \
\ .*7\\.config(\n|\r\n) \
\ .*9\\.config(\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
out

log "checking that package directories and locations are reported in order"
assertOutputContains
"The following errors occurred: \
\ - The package directory 'woops' does not contain any .cabal file."
woopping
\ - The package directory 'no-pkg-1' does not contain any .cabal file. \
\ - The package location 'no-pkg-2-dir' does not exist. \
\ - The package directory 'no-pkg-3' does not contain any .cabal file. \
\ - The package location 'no-pkg-4-dir' does not exist."
out

return ()
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import: ../2.config
import: https://www.stackage.org/lts-21.25/cabal.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import: ../4.config
import: https://www.stackage.org/lts-21.25/cabal.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import: ../6.config
import: https://www.stackage.org/lts-21.25/cabal.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import: ../8.config
import: https://www.stackage.org/lts-21.25/cabal.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
There's intentionally no package here but the directory for the package exists
so that the project can find it.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
There's intentionally no package here but the directory for the package exists
so that the project can find it.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
packages:
no-pkg-1
no-pkg-2-dir
no-pkg-3
no-pkg-4-dir

import: 0.config

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 70a2369

Please sign in to comment.