Fixes #27.
This commit is contained in:
parent
dd45dd9418
commit
0cc45d05be
8 changed files with 55 additions and 1 deletions
|
|
@ -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.
|
||||||
|
|
|
||||||
9
tests/issue27/a/issue27a.babel
Normal file
9
tests/issue27/a/issue27a.babel
Normal 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"
|
||||||
1
tests/issue27/a/issue27a.nim
Normal file
1
tests/issue27/a/issue27a.nim
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
import issue27b
|
||||||
9
tests/issue27/b/issue27b.babel
Normal file
9
tests/issue27/b/issue27b.babel
Normal 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"
|
||||||
1
tests/issue27/b/issue27b.nim
Normal file
1
tests/issue27/b/issue27b.nim
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
proc test(): int = 4
|
||||||
11
tests/issue27/issue27.babel
Normal file
11
tests/issue27/issue27.babel
Normal 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"
|
||||||
1
tests/issue27/issue27.nim
Normal file
1
tests/issue27/issue27.nim
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
import issue27a
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue