diff options
author | David Walter Seikel | 2014-03-30 04:27:49 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-03-30 04:27:49 +1000 |
commit | f28c9229b02ac6886a53f78dfd5fe4bf4a707d1e (patch) | |
tree | 4dbdf16a82e268bb30f1c0a88e37d183a948626c /ClientHamr/GuiLua | |
parent | Move some Thing declerations to where they should be, now that the Thing oddn... (diff) | |
download | SledjHamr-f28c9229b02ac6886a53f78dfd5fe4bf4a707d1e.zip SledjHamr-f28c9229b02ac6886a53f78dfd5fe4bf4a707d1e.tar.gz SledjHamr-f28c9229b02ac6886a53f78dfd5fe4bf4a707d1e.tar.bz2 SledjHamr-f28c9229b02ac6886a53f78dfd5fe4bf4a707d1e.tar.xz |
More tests.
Diffstat (limited to '')
-rw-r--r-- | ClientHamr/GuiLua/test.lua | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/ClientHamr/GuiLua/test.lua b/ClientHamr/GuiLua/test.lua index 3efda30..016e050 100644 --- a/ClientHamr/GuiLua/test.lua +++ b/ClientHamr/GuiLua/test.lua | |||
@@ -29,7 +29,7 @@ print('code') | |||
29 | -- A variable that is private to this module. | 29 | -- A variable that is private to this module. |
30 | local fool | 30 | local fool |
31 | 31 | ||
32 | skang.thing('fooble,f', 'Help text goes here', 1, 'number', '"edit", "The fooble:", 1, 1, 10, 50', true) | 32 | skang.thing('fooble,f', 'Help text goes here', 1, nil, '"edit", "The fooble:", 1, 1, 10, 50', true) |
33 | skang.thing('bar', 'Help text', "Default") | 33 | skang.thing('bar', 'Help text', "Default") |
34 | skang.thing('foo') | 34 | skang.thing('foo') |
35 | 35 | ||
@@ -115,7 +115,6 @@ print(test.fooble .. ' ' .. test.f) | |||
115 | print(skang.get(test, 'f', 'default')) | 115 | print(skang.get(test, 'f', 'default')) |
116 | print('') | 116 | print('') |
117 | 117 | ||
118 | |||
119 | local stuff = {} | 118 | local stuff = {} |
120 | stuff.t = {} | 119 | stuff.t = {} |
121 | 120 | ||
@@ -125,7 +124,7 @@ skang.thing{'c', module=stuff.t, help = 'Another sub stufflet'} | |||
125 | print(skang.get(stuff, 'a', 'help')) | 124 | print(skang.get(stuff, 'a', 'help')) |
126 | print(skang.get(stuff.t, 'b', 'help')) | 125 | print(skang.get(stuff.t, 'b', 'help')) |
127 | print(skang.get(stuff.t, 'c', 'help')) | 126 | print(skang.get(stuff.t, 'c', 'help')) |
128 | skang.thing{'b', module=test, help = 'A test stufflet for test'} | 127 | skang.thing{'baz,b', module=test, help = 'A test stufflet for test'} |
129 | print(skang.get(test, 'b', 'help')) | 128 | print(skang.get(test, 'b', 'help')) |
130 | print(skang.get(test, 'f', 'help')) | 129 | print(skang.get(test, 'f', 'help')) |
131 | stuff.a = '1' | 130 | stuff.a = '1' |
@@ -133,12 +132,30 @@ stuff.t.b = '2' | |||
133 | stuff.t.c = '3' | 132 | stuff.t.c = '3' |
134 | test.b = '422222' | 133 | test.b = '422222' |
135 | test.f = 5 | 134 | test.f = 5 |
135 | test_c.cbar = '666' | ||
136 | -- This one doesn't actually exist. | ||
137 | test_c.bar = '7' | ||
138 | print('') | ||
139 | |||
136 | print(skang.get(stuff, 'a')) | 140 | print(skang.get(stuff, 'a')) |
137 | print(skang.get(stuff.t, 'b')) | 141 | print(skang.get(stuff.t, 'b')) |
138 | print(skang.get(stuff.t, 'c')) | 142 | print(skang.get(stuff.t, 'c')) |
139 | print(skang.get(test, 'b')) | 143 | print(skang.get(test, 'b')) |
144 | print(skang.get(test, 'baz')) | ||
140 | print(skang.get(test, 'f')) | 145 | print(skang.get(test, 'f')) |
141 | print(skang.get(test, 'fooble')) | 146 | print(skang.get(test, 'fooble')) |
147 | print(skang.get(test_c, 'cbar')) | ||
148 | print(skang.get(test_c, 'bar')) | ||
149 | print('') | ||
150 | |||
142 | print(stuff.a) | 151 | print(stuff.a) |
143 | print(stuff.t.b) | 152 | print(stuff.t.b) |
144 | print(stuff.t.c) | 153 | print(stuff.t.c) |
154 | print(test.b) | ||
155 | print(test.baz) | ||
156 | print(test.f) | ||
157 | print(test.fooble) | ||
158 | print(test_c.cbar) | ||
159 | print(test_c.bar) | ||
160 | print(test_c.c) | ||
161 | print(test_c.cfooble) | ||