parent
3c1e669eaa
commit
92e9ec5e59
6 changed files with 203 additions and 74 deletions
10
tests/revdep/mydep/mydep.nimble
Normal file
10
tests/revdep/mydep/mydep.nimble
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Package
|
||||
|
||||
version = "0.1.0"
|
||||
author = "Dominik Picheta"
|
||||
description = "Random dep"
|
||||
license = "MIT"
|
||||
|
||||
# Dependencies
|
||||
|
||||
requires "nim >= 0.15.0"
|
||||
11
tests/revdep/pkgNoDep/pkgA.nimble
Normal file
11
tests/revdep/pkgNoDep/pkgA.nimble
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# Package
|
||||
|
||||
version = "0.1.0"
|
||||
author = "Dominik Picheta"
|
||||
description = "Correctly structured package A"
|
||||
license = "MIT"
|
||||
|
||||
# Dependencies
|
||||
|
||||
requires "nim >= 0.15.0"
|
||||
|
||||
11
tests/revdep/pkgWithDep/pkgA.nimble
Normal file
11
tests/revdep/pkgWithDep/pkgA.nimble
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# Package
|
||||
|
||||
version = "0.1.0"
|
||||
author = "Dominik Picheta"
|
||||
description = "Correctly structured package A"
|
||||
license = "MIT"
|
||||
|
||||
# Dependencies
|
||||
|
||||
requires "nim >= 0.15.0", "mydep"
|
||||
|
||||
|
|
@ -38,6 +38,15 @@ proc execNimble(args: varargs[string]): tuple[output: string, exitCode: int] =
|
|||
|
||||
result = execCmdEx(quotedArgs.join(" "))
|
||||
|
||||
proc execNimbleYes(args: varargs[string]): tuple[output: string, exitCode: int]=
|
||||
# issue #6314
|
||||
execNimble(@args & "-y")
|
||||
|
||||
template verify(res: (string, int)) =
|
||||
let r = res
|
||||
checkpoint r[0]
|
||||
check r[1] == QuitSuccess
|
||||
|
||||
proc processOutput(output: string): seq[string] =
|
||||
output.strip.splitLines().filter((x: string) => (x.len > 0))
|
||||
|
||||
|
|
@ -466,6 +475,29 @@ test "can pass args with spaces to Nim (#351)":
|
|||
checkpoint output
|
||||
check exitCode == QuitSuccess
|
||||
|
||||
suite "reverse dependencies":
|
||||
test "basic test":
|
||||
cd "revdep/mydep":
|
||||
verify execNimbleYes("install")
|
||||
|
||||
cd "revdep/pkgWithDep":
|
||||
verify execNimbleYes("install")
|
||||
|
||||
verify execNimbleYes("remove", "pkgA")
|
||||
verify execNimbleYes("remove", "mydep")
|
||||
|
||||
test "issue #373":
|
||||
cd "revdep/mydep":
|
||||
verify execNimbleYes("install")
|
||||
|
||||
cd "revdep/pkgWithDep":
|
||||
verify execNimbleYes("install")
|
||||
|
||||
cd "revdep/pkgNoDep":
|
||||
verify execNimbleYes("install")
|
||||
|
||||
verify execNimbleYes("remove", "mydep")
|
||||
|
||||
suite "develop feature":
|
||||
test "can reject binary packages":
|
||||
cd "develop/binary":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue