diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-02-12 14:50:41 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-12 23:50:41 +0100 |
commit | 4326f743d0fe6fb206047db8025206d3cf0d554b (patch) | |
tree | c810e66f1468685e09c94d5ae43887926552bd80 /tests/vm | |
parent | afa87f223cdb9fd10e8b6f70aad51c44da7303a7 (diff) | |
download | Nim-4326f743d0fe6fb206047db8025206d3cf0d554b.tar.gz |
compilesettings: add libpath (#16997)
* compilesettings: add libpath * add test * changelog * fixup Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'tests/vm')
-rw-r--r-- | tests/vm/tcompilesetting.nim | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/tests/vm/tcompilesetting.nim b/tests/vm/tcompilesetting.nim index 98565ab94..5bf559c74 100644 --- a/tests/vm/tcompilesetting.nim +++ b/tests/vm/tcompilesetting.nim @@ -3,18 +3,15 @@ cmd: "nim c --nimcache:build/myNimCache --nimblePath:myNimblePath $file" joinable: false """ -import strutils +import std/[strutils,compilesettings] +from std/os import fileExists, `/` -import std / compilesettings +template main = + doAssert querySetting(nimcacheDir) == nimcacheDir.querySetting + doAssert "myNimCache" in nimcacheDir.querySetting + doAssert "myNimblePath" in nimblePaths.querySettingSeq[0] + doAssert querySetting(backend) == "c" + doAssert fileExists(libPath.querySetting / "system.nim") -const - nc = querySetting(nimcacheDir) - np = querySettingSeq(nimblePaths) - -static: - echo nc - echo np - -doAssert "myNimCache" in nc -doAssert "myNimblePath" in np[0] -doAssert querySetting(backend) == "c" +static: main() +main() |