diff --git a/tests/testCommand/testsCWD/testing123.nimble b/tests/testCommand/testsCWD/testing123.nimble new file mode 100644 index 0000000..00e43bf --- /dev/null +++ b/tests/testCommand/testsCWD/testing123.nimble @@ -0,0 +1,4 @@ +version = "0.1.0" +author = "John Doe" +description = "Nimble Test" +license = "BSD" diff --git a/tests/testCommand/testsCWD/tests/tcwd.nim b/tests/testCommand/testsCWD/tests/tcwd.nim new file mode 100644 index 0000000..444a862 --- /dev/null +++ b/tests/testCommand/testsCWD/tests/tcwd.nim @@ -0,0 +1,2 @@ +import os +echo(getCurrentDir()) \ No newline at end of file diff --git a/tests/tester.nim b/tests/tester.nim index 9ac57df..c26bb00 100644 --- a/tests/tester.nim +++ b/tests/tester.nim @@ -38,7 +38,11 @@ proc execNimble(args: varargs[string]): tuple[output: string, exitCode: int] = 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) checkpoint(result.output) @@ -689,6 +693,12 @@ suite "test command": check(not outp.processOutput.inLines("Should be ignored")) 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": test "can succeed package": cd "binaryPackage/v1":