forked from commercialhaskell/stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration test for package location in deps
- Loading branch information
1 parent
c230035
commit 748d3c4
Showing
3 changed files
with
76 additions
and
40 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -13,6 +13,75 @@ main = do | |
, "│ │ │ └─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ └── rts 1.0" | ||
, "│ │ └── rts 1.0" | ||
, "│ ├─┬ filelock 0.1.1.2" | ||
, "│ │ ├─┬ base 4.10.1.0" | ||
, "│ │ │ ├─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ └── rts 1.0" | ||
, "│ │ │ ├─┬ integer-gmp 1.0.1.0" | ||
, "│ │ │ │ └─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ └── rts 1.0" | ||
, "│ │ │ └── rts 1.0" | ||
, "│ │ └─┬ unix 2.7.2.2" | ||
, "│ │ ├─┬ base 4.10.1.0" | ||
, "│ │ │ ├─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ └── rts 1.0" | ||
, "│ │ │ ├─┬ integer-gmp 1.0.1.0" | ||
, "│ │ │ │ └─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ └── rts 1.0" | ||
, "│ │ │ └── rts 1.0" | ||
, "│ │ ├─┬ bytestring 0.10.8.2" | ||
, "│ │ │ ├─┬ base 4.10.1.0" | ||
, "│ │ │ │ ├─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ │ └── rts 1.0" | ||
, "│ │ │ │ ├─┬ integer-gmp 1.0.1.0" | ||
, "│ │ │ │ │ └─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ │ └── rts 1.0" | ||
, "│ │ │ │ └── rts 1.0" | ||
, "│ │ │ ├─┬ deepseq 1.4.3.0" | ||
, "│ │ │ │ ├─┬ array 0.5.2.0" | ||
, "│ │ │ │ │ └─┬ base 4.10.1.0" | ||
, "│ │ │ │ │ ├─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ │ │ └── rts 1.0" | ||
, "│ │ │ │ │ ├─┬ integer-gmp 1.0.1.0" | ||
, "│ │ │ │ │ │ └─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ │ │ └── rts 1.0" | ||
, "│ │ │ │ │ └── rts 1.0" | ||
, "│ │ │ │ └─┬ base 4.10.1.0" | ||
, "│ │ │ │ ├─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ │ └── rts 1.0" | ||
, "│ │ │ │ ├─┬ integer-gmp 1.0.1.0" | ||
, "│ │ │ │ │ └─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ │ └── rts 1.0" | ||
, "│ │ │ │ └── rts 1.0" | ||
, "│ │ │ ├─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ └── rts 1.0" | ||
, "│ │ │ └─┬ integer-gmp 1.0.1.0" | ||
, "│ │ │ └─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ └── rts 1.0" | ||
, "│ │ └─┬ time 1.8.0.2" | ||
, "│ │ ├─┬ base 4.10.1.0" | ||
, "│ │ │ ├─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ └── rts 1.0" | ||
, "│ │ │ ├─┬ integer-gmp 1.0.1.0" | ||
, "│ │ │ │ └─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ └── rts 1.0" | ||
, "│ │ │ └── rts 1.0" | ||
, "│ │ └─┬ deepseq 1.4.3.0" | ||
, "│ │ ├─┬ array 0.5.2.0" | ||
, "│ │ │ └─┬ base 4.10.1.0" | ||
, "│ │ │ ├─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ └── rts 1.0" | ||
, "│ │ │ ├─┬ integer-gmp 1.0.1.0" | ||
, "│ │ │ │ └─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ │ └── rts 1.0" | ||
, "│ │ │ └── rts 1.0" | ||
, "│ │ └─┬ base 4.10.1.0" | ||
, "│ │ ├─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ └── rts 1.0" | ||
, "│ │ ├─┬ integer-gmp 1.0.1.0" | ||
, "│ │ │ └─┬ ghc-prim 0.5.1.1" | ||
, "│ │ │ └── rts 1.0" | ||
, "│ │ └── rts 1.0" | ||
, "│ ├─┬ mtl 2.2.2" | ||
, "│ │ ├─┬ base 4.10.1.0" | ||
, "│ │ │ ├─┬ ghc-prim 0.5.1.1" | ||
|
@@ -53,6 +122,7 @@ main = do | |
let expected = unlines [ "Packages" | ||
, "├─┬ files 0.1.0.0" | ||
, "│ ├── base 4.10.1.0" | ||
, "│ ├── filelock 0.1.1.2" | ||
, "│ ├── mtl 2.2.2" | ||
, "│ └── subproject 0.1.0.0" | ||
, "└─┬ subproject 0.1.0.0" | ||
|
@@ -61,7 +131,7 @@ main = do | |
when (stdOut /= expected) $ | ||
error $ unlines [ "Expected:", expected, "Actual:", stdOut ] | ||
|
||
stackCheckStdout ["ls", "dependencies", "--tree", "subproject"] $ \stdOut -> do | ||
stackCheckStdout ["ls", "dependencies", "tree", "subproject"] $ \stdOut -> do | ||
let expected = unlines [ "Packages" | ||
, "└─┬ subproject 0.1.0.0" | ||
, " └─┬ base 4.10.1.0" | ||
|
@@ -76,43 +146,6 @@ main = do | |
error $ unlines [ "Expected:", expected, "Actual:", stdOut ] | ||
|
||
stackCheckStdout ["ls", "dependencies", "json"] $ \stdOut -> do | ||
let expected = unlines [ "[" | ||
, " {" | ||
, " \"name\": \"transformers\"," | ||
, " \"version\": \"0.5.2.0\"," | ||
, " \"license\": \"BSD3\"" | ||
, " }," | ||
, " {" | ||
, " \"name\": \"rts\"," | ||
, " \"version\": \"1.0\"," | ||
, " \"license\": \"BSD3\"" | ||
, " }," | ||
, " {" | ||
, " \"name\": \"mtl\"," | ||
, " \"version\": \"2.2.2\"," | ||
, " \"license\": \"BSD3\"" | ||
, " }," | ||
, " {" | ||
, " \"name\": \"integer-gmp\"," | ||
, " \"version\": \"1.0.1.0\"," | ||
, " \"license\": \"BSD3\"" | ||
, " }," | ||
, " {" | ||
, " \"name\": \"ghc-prim\"," | ||
, " \"version\": \"0.5.1.1\"," | ||
, " \"license\": \"BSD3\"" | ||
, " }," | ||
, " {" | ||
, " \"name\": \"files\"," | ||
, " \"version\": \"0.1.0.0\"," | ||
, " \"license\": \"AllRightsReserved\"" | ||
, " }," | ||
, " {" | ||
, " \"name\": \"base\"," | ||
, " \"version\": \"4.10.1.0\"," | ||
, " \"license\": \"BSD3\"" | ||
, " }" | ||
, "]" | ||
] | ||
let expected = "[{\"name\":\"unix\",\"version\":\"2.7.2.2\",\"license\":\"BSD3\"},{\"name\":\"transformers\",\"version\":\"0.5.2.0\",\"license\":\"BSD3\"},{\"name\":\"time\",\"version\":\"1.8.0.2\",\"license\":\"BSD3\"},{\"location\":{\"url\":\"file:///Users/axeman/work/stack/test/integration/tests/4101-dependency-tree/files/subproject/\",\"type\":\"project package\"},\"name\":\"subproject\",\"version\":\"0.1.0.0\",\"license\":\"AllRightsReserved\"},{\"name\":\"rts\",\"version\":\"1.0\",\"license\":\"BSD3\"},{\"location\":{\"url\":\"https://hackage.haskell.org/package/mtl-2.2.2\",\"type\":\"hackage\"},\"name\":\"mtl\",\"version\":\"2.2.2\",\"license\":\"BSD3\"},{\"name\":\"integer-gmp\",\"version\":\"1.0.1.0\",\"license\":\"BSD3\"},{\"name\":\"ghc-prim\",\"version\":\"0.5.1.1\",\"license\":\"BSD3\"},{\"location\":{\"url\":\"file:///Users/axeman/work/stack/test/integration/tests/4101-dependency-tree/files/\",\"type\":\"project package\"},\"name\":\"files\",\"version\":\"0.1.0.0\",\"license\":\"AllRightsReserved\"},{\"location\":{\"subdir\":\"\",\"url\":\"[email protected]:snoyberg/filelock\",\"type\":\"git\",\"commit\":\"4f080496d8bf153fbe26e64d1f52cf73c7db25f6\"},\"name\":\"filelock\",\"version\":\"0.1.1.2\",\"license\":\"PublicDomain\"},{\"name\":\"deepseq\",\"version\":\"1.4.3.0\",\"license\":\"BSD3\"},{\"name\":\"bytestring\",\"version\":\"0.10.8.2\",\"license\":\"BSD3\"},{\"name\":\"base\",\"version\":\"4.10.1.0\",\"license\":\"BSD3\"},{\"name\":\"array\",\"version\":\"0.5.2.0\",\"license\":\"BSD3\"}]\n" | ||
when (stdOut /= expected) $ | ||
error $ unlines [ "Expected:", expected, "Actual:", stdOut ] |
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
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 |
---|---|---|
|
@@ -2,3 +2,6 @@ resolver: lts-11.22 | |
packages: | ||
- . | ||
- subproject | ||
extra-deps: | ||
- git: [email protected]:snoyberg/filelock | ||
commit: 4f080496d8bf153fbe26e64d1f52cf73c7db25f6 |