-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8226 from cabalism/test/sdist-multiple-projects-7241
Add test cases that reproduce sdist --project-file.
- Loading branch information
Showing
92 changed files
with
500 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions
2
cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.dot-uv.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 @@ | ||
# cabal sdist | ||
Wrote tarball sdist to <ROOT>/cabal.dot-uv.dist/work/./dist/sdist/p-0.1.tar.gz |
8 changes: 8 additions & 0 deletions
8
...-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.dot-uv.patch
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,8 @@ | ||
diff --git a/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.dot-uv.out b/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.dot-uv.out | ||
index 3d6859f99..a7ffc109e 100644 | ||
--- a/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.dot-uv.out | ||
+++ b/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.dot-uv.out | ||
@@ -1,2 +1,2 @@ | ||
# cabal sdist | ||
-Wrote tarball sdist to <ROOT>/cabal.dot-uv.dist/work/./dist/sdist/p-0.1.tar.gz | ||
+Wrote tarball sdist to <ROOT>/cabal.dot-uv.dist/work/./dist/sdist/uv-0.1.tar.gz |
1 change: 1 addition & 0 deletions
1
...estsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.dot-uv.project
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 @@ | ||
packages: . |
12 changes: 12 additions & 0 deletions
12
...estsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.dot-uv.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,12 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- cabal.dot-uv.project has "packages: .". That package is uv.cabal but "cabal | ||
-- sdist" writes sdist/p-0.1.tar.gz instead of the expected sdist/uv-0.1.tar.gz. | ||
-- That is wrong, "cabal sdist" should respect the "--project-file" option but | ||
-- instead probes the parent directory and picks up "../cabal.project" that has | ||
-- "packages: Projects-Default-No/p". | ||
-- | ||
-- TODO: Fix this behaviour and apply the patch cabal.dot-uv.patch to update the | ||
-- expected output to what we'd expect if "cabal sdist" respected the project. | ||
main = cabalTest . withProjectFile "cabal.dot-uv.project" $ do | ||
cabal "sdist" ["all"] |
2 changes: 2 additions & 0 deletions
2
...testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.dot-uv.v2.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 @@ | ||
# cabal v2-sdist | ||
Wrote tarball sdist to <ROOT>/dist-newstyle/sdist/uv-0.1.tar.gz |
6 changes: 6 additions & 0 deletions
6
...suite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.dot-uv.v2.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,6 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- cabal.dot-uv.project has "packages: .". That package is uv.cabal and "cabal | ||
-- v2-sdist" writes sdist/uv-0.1.tar.gz. This is correct. | ||
main = cabalTest . withProjectFile "cabal.dot-uv.project" $ do | ||
cabal "v2-sdist" ["all"] |
2 changes: 2 additions & 0 deletions
2
...uite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.ignore-project.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 @@ | ||
# cabal sdist | ||
Wrote tarball sdist to <ROOT>/cabal.ignore-project.dist/work/./dist/sdist/uv-0.1.tar.gz |
5 changes: 5 additions & 0 deletions
5
.../PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.ignore-project.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,5 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- This test correctly writes sdist/uv-0.1.tar.gz for the uv.cabal package. | ||
main = cabalTest $ do | ||
cabal "sdist" ["all", "--ignore-project"] |
2 changes: 2 additions & 0 deletions
2
...e/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.ignore-project.v2.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 @@ | ||
# cabal v2-sdist | ||
Wrote tarball sdist to /home/philderbeast/dev/src/cabalism/cabal/cabal-testsuite/PackageTests/SDist/Respect-Project-File/dist-newstyle/sdist/p-0.1.tar.gz |
8 changes: 8 additions & 0 deletions
8
...ckageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.ignore-project.v2.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,8 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- This test should have written sdist/uv-0.1.tar.gz for the uv.cabal package | ||
-- but instead it probed up the directory tree, found a default cabal.project | ||
-- and wrote sdist/p-0.1.tar.gz. That is incorrect. It didn't ignore the | ||
-- project. | ||
main = cabalTest $ do | ||
cabal "v2-sdist" ["all", "--ignore-project"] |
2 changes: 2 additions & 0 deletions
2
...estsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.no-project.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 @@ | ||
# cabal sdist | ||
Wrote tarball sdist to <ROOT>/cabal.no-project.dist/work/./dist/sdist/p-0.1.tar.gz |
9 changes: 9 additions & 0 deletions
9
...uite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.no-project.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,9 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- When no project is given, "cabal sdist" probes up the directory tree, finds a | ||
-- default cabal.project and writes sdist/p-0.1.tar.gz. That is acceptable. An | ||
-- alternative and reasonable expectation (but not the behaviour seen) is that | ||
-- project probing would not occur and "cabal sdist" would work on the local | ||
-- uv.cabal package. | ||
main = cabalTest $ do | ||
cabal "sdist" ["all"] |
2 changes: 2 additions & 0 deletions
2
...suite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.no-project.v2.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 @@ | ||
# cabal v2-sdist | ||
Wrote tarball sdist to /home/philderbeast/dev/src/cabalism/cabal/cabal-testsuite/PackageTests/SDist/Respect-Project-File/dist-newstyle/sdist/p-0.1.tar.gz |
9 changes: 9 additions & 0 deletions
9
...e/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.no-project.v2.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,9 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- When no project is given, "cabal v2-sdist" probes up the directory tree, | ||
-- finds a default cabal.project and writes sdist/p-0.1.tar.gz. That is | ||
-- acceptable. An alternative and reasonable expectation (but not the behaviour | ||
-- seen) is that project probing would not occur and "cabal v2-sdist" would work | ||
-- on the local uv.cabal package. | ||
main = cabalTest $ do | ||
cabal "v2-sdist" ["all"] |
2 changes: 2 additions & 0 deletions
2
cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-pq.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 @@ | ||
# cabal sdist | ||
Wrote tarball sdist to <ROOT>/cabal.sub-pq.dist/work/./dist/sdist/p-0.1.tar.gz |
8 changes: 8 additions & 0 deletions
8
...-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-pq.patch
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,8 @@ | ||
diff --git a/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-pq.out b/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-pq.out | ||
index c96d15ee6..12dcc1217 100644 | ||
--- a/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-pq.out | ||
+++ b/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-pq.out | ||
@@ -1,2 +1,3 @@ | ||
# cabal sdist | ||
Wrote tarball sdist to <ROOT>/cabal.sub-pq.dist/work/./dist/sdist/p-0.1.tar.gz | ||
+Wrote tarball sdist to <ROOT>/cabal.sub-pq.dist/work/./dist/sdist/q-0.1.tar.gz |
1 change: 1 addition & 0 deletions
1
...estsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-pq.project
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 @@ | ||
packages: p/ q/ |
12 changes: 12 additions & 0 deletions
12
...estsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-pq.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,12 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- cabal.sub-pq.project has "packages: p/ q/" but "cabal sdist" only writes | ||
-- sdist/p-0.1.tar.gz instead of the expected sdist/p-0.1.tar.gz and | ||
-- sdist/q-0.1.tar.gz. That is wrong, "cabal sdist" should respect the | ||
-- "--project-file" option but instead probes the parent directory and picks up | ||
-- "../cabal.project" that has "packages: Projects-Default-No/p". | ||
-- | ||
-- TODO: Fix this behaviour and apply the patch cabal.sub-pq.patch to update the | ||
-- expected output to what we'd expect if "cabal sdist" respected the project. | ||
main = cabalTest . withProjectFile "cabal.sub-pq.project" $ do | ||
cabal "sdist" ["all"] |
3 changes: 3 additions & 0 deletions
3
...testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-pq.v2.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,3 @@ | ||
# cabal v2-sdist | ||
Wrote tarball sdist to <ROOT>/dist-newstyle/sdist/p-0.1.tar.gz | ||
Wrote tarball sdist to <ROOT>/dist-newstyle/sdist/q-0.1.tar.gz |
6 changes: 6 additions & 0 deletions
6
...suite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-pq.v2.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,6 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- cabal.sub-pq.project has "packages: p/ q/" and "cabal v2-sdist" writes | ||
-- sdist/p-0.1.tar.gz and sdist/q-0.1.tar.gz. This is correct. | ||
main = cabalTest . withProjectFile "cabal.sub-pq.project" $ do | ||
cabal "v2-sdist" ["all"] |
2 changes: 2 additions & 0 deletions
2
cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-rs.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 @@ | ||
# cabal sdist | ||
Wrote tarball sdist to <ROOT>/cabal.sub-rs.dist/work/./dist/sdist/p-0.1.tar.gz |
9 changes: 9 additions & 0 deletions
9
...-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-rs.patch
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,9 @@ | ||
diff --git a/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-rs.out b/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-rs.out | ||
index 3a0a8e5f4..b4cced990 100644 | ||
--- a/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-rs.out | ||
+++ b/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-rs.out | ||
@@ -1,2 +1,3 @@ | ||
# cabal sdist | ||
-Wrote tarball sdist to <ROOT>/cabal.sub-rs.dist/work/./dist/sdist/p-0.1.tar.gz | ||
+Wrote tarball sdist to <ROOT>/cabal.sub-rs.dist/work/./dist/sdist/r-0.1.tar.gz | ||
+Wrote tarball sdist to <ROOT>/cabal.sub-rs.dist/work/./dist/sdist/s-0.1.tar.gz |
1 change: 1 addition & 0 deletions
1
...estsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-rs.project
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 @@ | ||
packages: r/ s/ |
12 changes: 12 additions & 0 deletions
12
...estsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-rs.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,12 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- cabal.sub-rs.project has "packages: r/ s/" but "cabal sdist" writes | ||
-- sdist/p-0.1.tar.gz instead of the expected sdist/r-0.1.tar.gz and | ||
-- sdist/s-0.1.tar.gz. That is wrong, "cabal sdist" should respect the | ||
-- "--project-file" option but instead probes the parent directory and picks up | ||
-- "../cabal.project" that has "packages: Projects-Default-No/p". | ||
-- | ||
-- TODO: Fix this behaviour and apply the patch cabal.sub-rs.patch to update the | ||
-- expected output to what we'd expect if "cabal sdist" respected the project. | ||
main = cabalTest . withProjectFile "cabal.sub-rs.project" $ do | ||
cabal "sdist" ["all"] |
3 changes: 3 additions & 0 deletions
3
...testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-rs.v2.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,3 @@ | ||
# cabal v2-sdist | ||
Wrote tarball sdist to <ROOT>/dist-newstyle/sdist/r-0.1.tar.gz | ||
Wrote tarball sdist to <ROOT>/dist-newstyle/sdist/s-0.1.tar.gz |
6 changes: 6 additions & 0 deletions
6
...suite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/cabal.sub-rs.v2.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,6 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- cabal.sub-rs.project has "packages: r/ s/" and "cabal v2-sdist" writes | ||
-- sdist/r-0.1.tar.gz and sdist/s-0.1.tar.gz. This is correct. | ||
main = cabalTest . withProjectFile "cabal.sub-rs.project" $ do | ||
cabal "v2-sdist" ["all"] |
Empty file.
8 changes: 8 additions & 0 deletions
8
cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/p/p.cabal
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,8 @@ | ||
name: p | ||
version: 0.1 | ||
build-type: Simple | ||
cabal-version: >= 1.2 | ||
|
||
library | ||
exposed-modules: P | ||
build-depends: base |
Empty file.
8 changes: 8 additions & 0 deletions
8
cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/q/q.cabal
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,8 @@ | ||
name: q | ||
version: 0.1 | ||
build-type: Simple | ||
cabal-version: >= 1.2 | ||
|
||
library | ||
exposed-modules: Q | ||
build-depends: base |
Empty file.
8 changes: 8 additions & 0 deletions
8
cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/r/r.cabal
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,8 @@ | ||
name: r | ||
version: 0.1 | ||
build-type: Simple | ||
cabal-version: >= 1.2 | ||
|
||
library | ||
exposed-modules: R | ||
build-depends: base |
Empty file.
8 changes: 8 additions & 0 deletions
8
cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/s/s.cabal
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,8 @@ | ||
name: s | ||
version: 0.1 | ||
build-type: Simple | ||
cabal-version: >= 1.2 | ||
|
||
library | ||
exposed-modules: S | ||
build-depends: base |
14 changes: 14 additions & 0 deletions
14
cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-No/uv.cabal
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,14 @@ | ||
cabal-version: 3.0 | ||
name: uv | ||
version: 0.1 | ||
build-type: Simple | ||
|
||
library U | ||
visibility: public | ||
exposed-modules: U | ||
build-depends: base | ||
|
||
library V | ||
visibility: public | ||
exposed-modules: V | ||
build-depends: base |
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions
3
...l-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.dot-uv.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,3 @@ | ||
# cabal sdist | ||
Wrote tarball sdist to <ROOT>/cabal.dot-uv.dist/work/./dist/sdist/p-0.1.tar.gz | ||
Wrote tarball sdist to <ROOT>/cabal.dot-uv.dist/work/./dist/sdist/q-0.1.tar.gz |
9 changes: 9 additions & 0 deletions
9
...testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.dot-uv.patch
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,9 @@ | ||
diff --git a/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.dot-uv.out b/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.dot-uv.out | ||
index 231e0d306..a7ffc109e 100644 | ||
--- a/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.dot-uv.out | ||
+++ b/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.dot-uv.out | ||
@@ -1,3 +1,2 @@ | ||
# cabal sdist | ||
-Wrote tarball sdist to <ROOT>/cabal.dot-uv.dist/work/./dist/sdist/p-0.1.tar.gz | ||
-Wrote tarball sdist to <ROOT>/cabal.dot-uv.dist/work/./dist/sdist/q-0.1.tar.gz | ||
+Wrote tarball sdist to <ROOT>/cabal.dot-uv.dist/work/./dist/sdist/uv-0.1.tar.gz |
1 change: 1 addition & 0 deletions
1
...stsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.dot-uv.project
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 @@ | ||
packages: . |
12 changes: 12 additions & 0 deletions
12
...stsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.dot-uv.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,12 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- cabal.dot-uv.project has "packages: .". That package is uv.cabal but "cabal | ||
-- sdist" writes sdist/p-0.1.tar.gz and sdist/q-0.1.tar.gz instead of the | ||
-- expected sdist/uv-0.1.tar.gz. That is wrong, "cabal sdist" should respect | ||
-- the "--project-file" option but instead picks up the default "cabal.project" | ||
-- that has "packages: p/ q/". | ||
-- | ||
-- TODO: Fix this behaviour and apply the patch cabal.dot-uv.patch to update the | ||
-- expected output to what we'd expect if "cabal sdist" respected the project. | ||
main = cabalTest . withProjectFile "cabal.dot-uv.project" $ do | ||
cabal "sdist" ["all"] |
2 changes: 2 additions & 0 deletions
2
...estsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.dot-uv.v2.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 @@ | ||
# cabal v2-sdist | ||
Wrote tarball sdist to <ROOT>/dist-newstyle/sdist/uv-0.1.tar.gz |
6 changes: 6 additions & 0 deletions
6
...uite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.dot-uv.v2.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,6 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- cabal.dot-uv.project has "packages: .". That package is uv.cabal and "cabal | ||
-- v2-sdist" writes sdist/p-0.1.tar.gz and sdist/q-0.1.tar.gz. That is correct. | ||
main = cabalTest . withProjectFile "cabal.dot-uv.project" $ do | ||
cabal "v2-sdist" ["all"] |
2 changes: 2 additions & 0 deletions
2
...ite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.ignore-project.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 @@ | ||
# cabal sdist | ||
Wrote tarball sdist to <ROOT>/cabal.ignore-project.dist/work/./dist/sdist/uv-0.1.tar.gz |
5 changes: 5 additions & 0 deletions
5
...PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.ignore-project.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,5 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- This test correctly writes sdist/uv-0.1.tar.gz for the uv.cabal package. | ||
main = cabalTest $ do | ||
cabal "sdist" ["all", "--ignore-project"] |
3 changes: 3 additions & 0 deletions
3
.../PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.ignore-project.v2.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,3 @@ | ||
# cabal v2-sdist | ||
Wrote tarball sdist to <ROOT>/dist-newstyle/sdist/p-0.1.tar.gz | ||
Wrote tarball sdist to <ROOT>/dist-newstyle/sdist/q-0.1.tar.gz |
Empty file.
7 changes: 7 additions & 0 deletions
7
...kageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.ignore-project.v2.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,7 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- This test doesn't ignore the project. It should have written | ||
-- sdist/uv-0.1.tar.gz for the uv.cabal package but instead it wrote | ||
-- sdist/p-0.1.tar.gz and sdist/q-0.1.tar.gz. | ||
main = cabalTest $ do | ||
cabal "v2-sdist" ["all", "--ignore-project"] |
3 changes: 3 additions & 0 deletions
3
...stsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.no-project.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,3 @@ | ||
# cabal sdist | ||
Wrote tarball sdist to <ROOT>/cabal.no-project.dist/work/./dist/sdist/p-0.1.tar.gz | ||
Wrote tarball sdist to <ROOT>/cabal.no-project.dist/work/./dist/sdist/q-0.1.tar.gz |
10 changes: 10 additions & 0 deletions
10
...ite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.no-project.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,10 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- When no project is given, "cabal sdist" finds a default cabal.project that | ||
-- has "packages: p/ q/" and writes sdist/p-0.1.tar.gz and sdist/q-0.1.tar.gz. | ||
-- This is correct. | ||
-- | ||
-- TODO: Check that the code is behaving the same as it would have if | ||
-- "--project-file=cabal.project" was given or if it is using project probing. | ||
main = cabalTest $ do | ||
cabal "sdist" ["all"] |
3 changes: 3 additions & 0 deletions
3
...uite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.no-project.v2.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,3 @@ | ||
# cabal v2-sdist | ||
Wrote tarball sdist to <ROOT>/dist-newstyle/sdist/p-0.1.tar.gz | ||
Wrote tarball sdist to <ROOT>/dist-newstyle/sdist/q-0.1.tar.gz |
Empty file.
7 changes: 7 additions & 0 deletions
7
.../PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.no-project.v2.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,7 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- When no project is given, "cabal v2-sdist" finds a default cabal.project that | ||
-- has "packages: p/ q/" and writes sdist/p-0.1.tar.gz and sdist/q-0.1.tar.gz. | ||
-- This is correct. | ||
main = cabalTest $ do | ||
cabal "v2-sdist" ["all"] |
1 change: 1 addition & 0 deletions
1
cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.project
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 @@ | ||
packages: p/ q/ |
3 changes: 3 additions & 0 deletions
3
...-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.project.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,3 @@ | ||
# cabal sdist | ||
Wrote tarball sdist to <ROOT>/cabal.project.dist/work/./dist/sdist/p-0.1.tar.gz | ||
Wrote tarball sdist to <ROOT>/cabal.project.dist/work/./dist/sdist/q-0.1.tar.gz |
7 changes: 7 additions & 0 deletions
7
...tsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.project.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,7 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- The given cabal.project has has "packages: p/ q/" and "cabal sdist" writes | ||
-- sdist/p-0.1.tar.gz and sdist/q-0.1.tar.gz. This is correct but likely | ||
-- accidental as the default cabal.project has the same packages. | ||
main = cabalTest . withProjectFile "cabal.project" $ do | ||
cabal "sdist" ["all"] |
3 changes: 3 additions & 0 deletions
3
...stsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.project.v2.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,3 @@ | ||
# cabal v2-sdist | ||
Wrote tarball sdist to <ROOT>/dist-newstyle/sdist/p-0.1.tar.gz | ||
Wrote tarball sdist to <ROOT>/dist-newstyle/sdist/q-0.1.tar.gz |
6 changes: 6 additions & 0 deletions
6
...ite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.project.v2.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,6 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- The given cabal.project has has "packages: p/ q/" and "cabal v2-sdist" writes | ||
-- sdist/p-0.1.tar.gz and sdist/q-0.1.tar.gz. This is correct. | ||
main = cabalTest . withProjectFile "cabal.project" $ do | ||
cabal "v2-sdist" ["all"] |
3 changes: 3 additions & 0 deletions
3
...l-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.sub-pq.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,3 @@ | ||
# cabal sdist | ||
Wrote tarball sdist to <ROOT>/cabal.sub-pq.dist/work/./dist/sdist/p-0.1.tar.gz | ||
Wrote tarball sdist to <ROOT>/cabal.sub-pq.dist/work/./dist/sdist/q-0.1.tar.gz |
1 change: 1 addition & 0 deletions
1
...stsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.sub-pq.project
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 @@ | ||
packages: p/ q/ |
6 changes: 6 additions & 0 deletions
6
...stsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.sub-pq.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,6 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- cabal.sub-pq.project has "packages: p/ q/" and "cabal sdist" writes | ||
-- sdist/p-0.1.tar.gz and sdist/q-0.1.tar.gz. This is correct. | ||
main = cabalTest . withProjectFile "cabal.sub-pq.project" $ do | ||
cabal "sdist" ["all"] |
3 changes: 3 additions & 0 deletions
3
...estsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.sub-pq.v2.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,3 @@ | ||
# cabal v2-sdist | ||
Wrote tarball sdist to <ROOT>/dist-newstyle/sdist/p-0.1.tar.gz | ||
Wrote tarball sdist to <ROOT>/dist-newstyle/sdist/q-0.1.tar.gz |
6 changes: 6 additions & 0 deletions
6
...uite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.sub-pq.v2.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,6 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- cabal.sub-pq.project has "packages: p/ q/" and "cabal v2-sdist" writes | ||
-- sdist/p-0.1.tar.gz and sdist/q-0.1.tar.gz. This is correct. | ||
main = cabalTest . withProjectFile "cabal.sub-pq.project" $ do | ||
cabal "v2-sdist" ["all"] |
3 changes: 3 additions & 0 deletions
3
...l-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.sub-rs.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,3 @@ | ||
# cabal sdist | ||
Wrote tarball sdist to <ROOT>/cabal.sub-rs.dist/work/./dist/sdist/p-0.1.tar.gz | ||
Wrote tarball sdist to <ROOT>/cabal.sub-rs.dist/work/./dist/sdist/q-0.1.tar.gz |
10 changes: 10 additions & 0 deletions
10
...testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.sub-rs.patch
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,10 @@ | ||
diff --git a/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.sub-rs.out b/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.sub-rs.out | ||
index 264d9e001..b4cced990 100644 | ||
--- a/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.sub-rs.out | ||
+++ b/cabal-testsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.sub-rs.out | ||
@@ -1,3 +1,3 @@ | ||
# cabal sdist | ||
-Wrote tarball sdist to <ROOT>/cabal.sub-rs.dist/work/./dist/sdist/p-0.1.tar.gz | ||
-Wrote tarball sdist to <ROOT>/cabal.sub-rs.dist/work/./dist/sdist/q-0.1.tar.gz | ||
+Wrote tarball sdist to <ROOT>/cabal.sub-rs.dist/work/./dist/sdist/r-0.1.tar.gz | ||
+Wrote tarball sdist to <ROOT>/cabal.sub-rs.dist/work/./dist/sdist/s-0.1.tar.gz |
1 change: 1 addition & 0 deletions
1
...stsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.sub-rs.project
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 @@ | ||
packages: r/ s/ |
12 changes: 12 additions & 0 deletions
12
...stsuite/PackageTests/SDist/Respect-Project-File/Projects-Default-Yes/cabal.sub-rs.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,12 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- cabal.sub-rs.project has "packages: r/ s/" but "cabal sdist" writes | ||
-- sdist/p-0.1.tar.gz and sdist/q-0.1.tar.gz instead of the expected | ||
-- sdist/r-0.1.tar.gz and sdist/s-0.1.tar.gz. That is wrong, "cabal sdist" | ||
-- should respect the "--project-file" option but instead picks up the default | ||
-- "cabal.project" that has "packages: p/ q/". | ||
-- | ||
-- TODO: Fix this behaviour and apply the patch cabal.sub-rs.patch to update the | ||
-- expected output to what we'd expect if "cabal sdist" respected the project. | ||
main = cabalTest . withProjectFile "cabal.sub-rs.project" $ do | ||
cabal "sdist" ["all"] |
Oops, something went wrong.