Adds test for #476. Closes #476.

This commit is contained in:
Dominik Picheta 2018-09-09 22:26:27 +01:00
commit 5dfe81556b
3 changed files with 17 additions and 1 deletions

View file

@ -0,0 +1,4 @@
version = "0.1.0"
author = "John Doe"
description = "Nimble Test"
license = "BSD"

View file

@ -0,0 +1,2 @@
import os
echo(getCurrentDir())

View file

@ -38,7 +38,11 @@ proc execNimble(args: varargs[string]): tuple[output: string, exitCode: int] =
let path = getCurrentDir().parentDir() / "src" let path = getCurrentDir().parentDir() / "src"
let cmd = "DYLD_LIBRARY_PATH=/usr/local/opt/openssl@1.1/lib PATH=" & path & ":$PATH " & quotedArgs.join(" ") var cmd = "PATH=" & path & ":$PATH " & quotedArgs.join(" ")
when defined(macosx):
# TODO: Yeah, this is really specific to my machine but for my own sanity...
cmd = "DYLD_LIBRARY_PATH=/usr/local/opt/openssl@1.1/lib " & cmd
result = execCmdEx(cmd) result = execCmdEx(cmd)
checkpoint(result.output) checkpoint(result.output)
@ -689,6 +693,12 @@ suite "test command":
check(not outp.processOutput.inLines("Should be ignored")) check(not outp.processOutput.inLines("Should be ignored"))
check outp.processOutput.inLines("First test") check outp.processOutput.inLines("First test")
test "CWD is root of package":
cd "testCommand/testsCWD":
let (outp, exitCode) = execNimble("test")
check exitCode == QuitSuccess
check outp.processOutput.inLines(getCurrentDir())
suite "check command": suite "check command":
test "can succeed package": test "can succeed package":
cd "binaryPackage/v1": cd "binaryPackage/v1":