Fixed tester and removed useless dir creation.
This commit is contained in:
parent
66027f9435
commit
dd45dd9418
2 changed files with 3 additions and 6 deletions
|
|
@ -409,14 +409,12 @@ proc getBabelTempDir(): string =
|
||||||
proc downloadPkg(url: string, verRange: PVersionRange,
|
proc downloadPkg(url: string, verRange: PVersionRange,
|
||||||
downMethod: TDownloadMethod): string =
|
downMethod: TDownloadMethod): string =
|
||||||
let downloadDir = (getBabelTempDir() / getDownloadDirName(url, verRange))
|
let downloadDir = (getBabelTempDir() / getDownloadDirName(url, verRange))
|
||||||
createDir(downloadDir.extractFilename)
|
|
||||||
echo("Downloading ", url, " into ", downloadDir, " using ", downMethod, "...")
|
echo("Downloading ", url, " into ", downloadDir, " using ", downMethod, "...")
|
||||||
doDownload(url, downloadDir, verRange, downMethod)
|
doDownload(url, downloadDir, verRange, downMethod)
|
||||||
result = downloadDir
|
result = downloadDir
|
||||||
|
|
||||||
proc downloadPkg(pkg: TPackage, verRange: PVersionRange): string =
|
proc downloadPkg(pkg: TPackage, verRange: PVersionRange): string =
|
||||||
let downloadDir = (getBabelTempDir() / getDownloadDirName(pkg, verRange))
|
let downloadDir = (getBabelTempDir() / getDownloadDirName(pkg, verRange))
|
||||||
createDir(downloadDir.extractFilename)
|
|
||||||
let downMethod = pkg.downloadMethod.getDownloadMethod()
|
let downMethod = pkg.downloadMethod.getDownloadMethod()
|
||||||
echo("Downloading ", pkg.name, " into ", downloadDir, " using ", downMethod, "...")
|
echo("Downloading ", pkg.name, " into ", downloadDir, " using ", downMethod, "...")
|
||||||
doDownload(pkg.url, downloadDir, verRange, downMethod)
|
doDownload(pkg.url, downloadDir, verRange, downMethod)
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,10 @@ test "can reject same version dependencies":
|
||||||
let (outp, exitCode) = execCmdEx(path & " install -y https://github.com/babel-test/packagebin.git")
|
let (outp, exitCode) = execCmdEx(path & " install -y https://github.com/babel-test/packagebin.git")
|
||||||
#echo outp
|
#echo outp
|
||||||
# TODO: outp is not in the correct order.
|
# TODO: outp is not in the correct order.
|
||||||
let ls = outp.splitLines()
|
let ls = outp.strip.splitLines()
|
||||||
check exitCode != QuitSuccess
|
check exitCode != QuitSuccess
|
||||||
check ls[ls.len-2] == "Error: unhandled exception: Cannot satisfy the dependency on PackageA 0.2.0 and PackageA 0.5.0 [EBabel]"
|
check ls[ls.len-1] == "Error: unhandled exception: Cannot satisfy the dependency on PackageA 0.2.0 and PackageA 0.5.0 [EBabel]"
|
||||||
# Last is ""? TODO
|
|
||||||
|
|
||||||
test "can update":
|
test "can update":
|
||||||
let (outp, exitCode) = execCmdEx(path & " update")
|
let (outp, exitCode) = execCmdEx(path & " update")
|
||||||
check exitCode == QuitSuccess
|
check exitCode == QuitSuccess
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue