summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorflywind <xzsflywind@gmail.com>2021-03-29 16:50:58 +0800
committerGitHub <noreply@github.com>2021-03-29 10:50:58 +0200
commit085580a2c8f303acf1654731ebc7dba7e6e501a7 (patch)
tree084d4c32ff361def90ec530d0e13a58684d38f0c /tests
parentb36182b0a4ca13d90c1a19de5b9945289c4f25fd (diff)
downloadNim-085580a2c8f303acf1654731ebc7dba7e6e501a7.tar.gz
fix #14010(fix std/registry + arc) (#17551)
* fix nim js cmp fails at CT

* fix #14010

* Update tests/stdlib/tregistry.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Update tregistry.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/stdlib/tregistry.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/stdlib/tregistry.nim b/tests/stdlib/tregistry.nim
new file mode 100644
index 000000000..8bf084f6d
--- /dev/null
+++ b/tests/stdlib/tregistry.nim
@@ -0,0 +1,15 @@
+discard """
+  disabled: "unix"
+  matrix: "--gc:refc; --gc:arc"
+"""
+
+when defined(windows):
+  import std/registry
+
+  block: # bug #14010
+    let path = "Environment"
+    let key = "D20210328T202842_key"
+    let val = "D20210328T202842_val"
+    let handle = HKEY_CURRENT_USER
+    setUnicodeValue("Environment", key, val, handle)
+    doAssert getUnicodeValue(path, key, handle) == val