This commit is contained in:
Dominik Picheta 2014-06-20 21:53:53 +01:00
commit 0cc45d05be
8 changed files with 55 additions and 1 deletions

View file

@ -272,6 +272,8 @@ proc processDeps(pkginfo: TPackageInfo, options: TOptions): seq[string] =
else: else:
echo("Dependency already satisfied.") echo("Dependency already satisfied.")
result.add(pkg.mypath.splitFile.dir) result.add(pkg.mypath.splitFile.dir)
# Process the dependencies of this dependency.
result.add(processDeps(pkg, options))
# Check if two packages of the same name (but different version) are listed # Check if two packages of the same name (but different version) are listed
# in the path. # in the path.

View file

@ -0,0 +1,9 @@
[Package]
name = "issue27a"
version = "0.1.0"
author = "Dominik Picheta"
description = "Dependency A for Issue 27"
license = "BSD"
[Deps]
Requires: "nimrod >= 0.9.3, issue27b"

View file

@ -0,0 +1 @@
import issue27b

View file

@ -0,0 +1,9 @@
[Package]
name = "issue27b"
version = "0.1.0"
author = "Dominik Picheta"
description = "Dependency B for Issue 27"
license = "BSD"
[Deps]
Requires: "nimrod >= 0.9.3"

View file

@ -0,0 +1 @@
proc test(): int = 4

View file

@ -0,0 +1,11 @@
[Package]
name = "issue27"
version = "0.1.0"
author = "Dominik Picheta"
description = "Test package for Issue 27"
license = "BSD"
bin = "issue27"
[Deps]
Requires: "nimrod >= 0.9.3, issue27a"

View file

@ -0,0 +1 @@
import issue27a

View file

@ -1,9 +1,17 @@
import osproc, unittest, strutils import osproc, unittest, strutils, os
const path = "../src/babel" const path = "../src/babel"
discard execCmdEx("nimrod c " & path) discard execCmdEx("nimrod c " & path)
template cd*(dir: string, body: stmt) =
## Sets the current dir to ``dir``, executes ``body`` and restores the
## previous working dir.
let lastDir = getCurrentDir()
setCurrentDir(dir)
body
setCurrentDir(lastDir)
test "can install packagebin2": test "can install packagebin2":
let (outp, exitCode) = execCmdEx(path & " install -y https://github.com/babel-test/packagebin2.git") let (outp, exitCode) = execCmdEx(path & " install -y https://github.com/babel-test/packagebin2.git")
check exitCode == QuitSuccess check exitCode == QuitSuccess
@ -19,3 +27,15 @@ test "can reject same version dependencies":
test "can update": test "can update":
let (outp, exitCode) = execCmdEx(path & " update") let (outp, exitCode) = execCmdEx(path & " update")
check exitCode == QuitSuccess check exitCode == QuitSuccess
test "issue #27":
# Install b
cd "issue27/b":
check execCmdEx("../../" & path & " install -y").exitCode == QuitSuccess
# Install a
cd "issue27/a":
check execCmdEx("../../" & path & " install -y").exitCode == QuitSuccess
cd "issue27":
check execCmdEx("../" & path & " install -y").exitCode == QuitSuccess