summary refs log tree commit diff stats
path: root/tests/vm/tcompilesetting.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-03-04 13:46:42 +0100
committerGitHub <noreply@github.com>2020-03-04 13:46:42 +0100
commit614fb7567c80c3b071394714c3809c005aaad397 (patch)
tree4548c2b1f9d46120e4b0bb6e83a127060e9954ba /tests/vm/tcompilesetting.nim
parent0809098971080674f723cb219722487e42011fd1 (diff)
downloadNim-614fb7567c80c3b071394714c3809c005aaad397.tar.gz
std/compilesettings implementation (#13584)
* Implement compileSetting() and compileSettingSeq()
* Change from magic to vmop
* better design for querySetting

Co-authored-by: genotrance <dev@genotrance.com>
Diffstat (limited to 'tests/vm/tcompilesetting.nim')
-rw-r--r--tests/vm/tcompilesetting.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/vm/tcompilesetting.nim b/tests/vm/tcompilesetting.nim
new file mode 100644
index 000000000..0e936d377
--- /dev/null
+++ b/tests/vm/tcompilesetting.nim
@@ -0,0 +1,19 @@
+discard """
+cmd: "nim c --nimcache:myNimCache --nimblePath:myNimblePath $file"
+joinable: false
+"""
+
+import strutils
+
+import std / compilesettings
+
+const
+  nc = querySetting(nimcacheDir)
+  np = querySettingSeq(nimblePaths)
+
+static:
+  echo nc
+  echo np
+
+doAssert "myNimCache" in nc
+doAssert "myNimblePath" in np[0]