Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/lua-winreg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlexey Melnichuk <alexeymelnichuck@gmail.com>2016-11-15 16:04:57 +0300
committerAlexey Melnichuk <alexeymelnichuck@gmail.com>2016-11-15 16:08:28 +0300
commit104aff465b80a879a9a44415baa34ce53bfa602a (patch)
tree933b4c1099906d284d080cd177d29c509fc08af8 /test
parent93608de75f120274e68f7250f0f64f4073e8d229 (diff)
Add. `32` and `64` access modes (close #1)
```Lua local p = [[HKEY_LOCAL_MACHINE\SOFTWARE]] local key = assert(winreg.openkey(p, 'r')) local key64 = assert(winreg.openkey(p, 'r64')) local key32 = assert(winreg.openkey(p, 'r32')) ```
Diffstat (limited to 'test')
-rw-r--r--test/test_5_1_14.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test_5_1_14.lua b/test/test_5_1_14.lua
new file mode 100644
index 0000000..a5fb409
--- /dev/null
+++ b/test/test_5_1_14.lua
@@ -0,0 +1,21 @@
+local winreg = require "winreg"
+
+local p = [[HKEY_LOCAL_MACHINE\SOFTWARE]]
+
+local key64 = assert(winreg.openkey(p, 'r64'))
+local key32 = assert(winreg.openkey(p, 'r32'))
+
+function DumpKeys(hkey)
+ for name in hkey:enumvalue() do
+ result, type = hkey:getvalue(name)
+ print(name, result, type)
+ end
+end
+
+print('X64:')
+DumpKeys(key64)
+print("---------------------------------")
+print('X32:')
+DumpKeys(key32)
+print("---------------------------------")
+