tregistry.nim 406 B

1234567891011121314151617
  1. discard """
  2. disabled: "unix"
  3. matrix: "--mm:refc; --mm:orc"
  4. """
  5. when defined(windows):
  6. import std/registry
  7. import std/assertions
  8. block: # bug #14010
  9. let path = "Environment"
  10. let key = "D20210328T202842_key"
  11. let val = "D20210328T202842_val"
  12. let handle = HKEY_CURRENT_USER
  13. setUnicodeValue("Environment", key, val, handle)
  14. doAssert getUnicodeValue(path, key, handle) == val