summary refs log tree commit diff stats
path: root/tests/testament
diff options
context:
space:
mode:
authorDennis Felsing <dennis@felsin9.de>2018-01-08 10:49:00 +0100
committerAndreas Rumpf <rumpf_a@web.de>2018-01-08 10:49:00 +0100
commit5492190bc63326069233a8aaf9f2e567cfc555f8 (patch)
tree2b1c4c802a60ca97b72798a461329f24d30913a6 /tests/testament
parente23ea64c41e101d4e1d933f0b015f51cc6c2f7de (diff)
downloadNim-5492190bc63326069233a8aaf9f2e567cfc555f8.tar.gz
Fix lists of paths in posix environment (#7034)
Empty paths in a colon separated list would be considered as the current
directory, so have to ensure $PATH and $LD_LIBRARY_PATH are not empty
before separating it with :
Diffstat (limited to 'tests/testament')
-rw-r--r--tests/testament/categories.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim
index 33b93e3c4..42e19d3dd 100644
--- a/tests/testament/categories.nim
+++ b/tests/testament/categories.nim
@@ -90,7 +90,7 @@ proc runBasicDLLTest(c, r: var TResults, cat: Category, options: string) =
     # posix relies on crappy LD_LIBRARY_PATH (ugh!):
     var libpath = getEnv"LD_LIBRARY_PATH".string
     # Temporarily add the lib directory to LD_LIBRARY_PATH:
-    putEnv("LD_LIBRARY_PATH", "tests/dll:" & libpath)
+    putEnv("LD_LIBRARY_PATH", "tests/dll" & (if libpath.len > 0: ":" & libpath else: ""))
     defer: putEnv("LD_LIBRARY_PATH", libpath)
     var nimrtlDll = DynlibFormat % "nimrtl"
     safeCopyFile("lib" / nimrtlDll, "tests/dll" / nimrtlDll)