Added tester.
This commit is contained in:
parent
4cd00aee62
commit
e163ee979b
2 changed files with 24 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -4,4 +4,5 @@
|
|||
nimcache/
|
||||
|
||||
# Absolute paths
|
||||
/babel
|
||||
/src/babel
|
||||
/tests/tester
|
||||
|
|
|
|||
22
tests/tester.nim
Normal file
22
tests/tester.nim
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import osproc, unittest, strutils
|
||||
|
||||
const path = "../src/babel"
|
||||
|
||||
discard execCmdEx("nimrod c " & path)
|
||||
|
||||
test "can install packagebin2":
|
||||
let (outp, exitCode) = execCmdEx(path & " install -y https://github.com/babel-test/packagebin2.git")
|
||||
check exitCode == QuitSuccess
|
||||
|
||||
test "can reject same version dependencies":
|
||||
let (outp, exitCode) = execCmdEx(path & " install -y https://github.com/babel-test/packagebin.git")
|
||||
#echo outp
|
||||
# TODO: outp is not in the correct order.
|
||||
let ls = outp.splitLines()
|
||||
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]"
|
||||
# Last is ""? TODO
|
||||
|
||||
test "can update":
|
||||
let (outp, exitCode) = execCmdEx(path & " update")
|
||||
check exitCode == QuitSuccess
|
||||
Loading…
Add table
Add a link
Reference in a new issue