aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr/GuiLua
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-03-30 04:27:49 +1000
committerDavid Walter Seikel2014-03-30 04:27:49 +1000
commitf28c9229b02ac6886a53f78dfd5fe4bf4a707d1e (patch)
tree4dbdf16a82e268bb30f1c0a88e37d183a948626c /ClientHamr/GuiLua
parentMove some Thing declerations to where they should be, now that the Thing oddn... (diff)
downloadSledjHamr-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.lua23
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.
30local fool 30local fool
31 31
32skang.thing('fooble,f', 'Help text goes here', 1, 'number', '"edit", "The fooble:", 1, 1, 10, 50', true) 32skang.thing('fooble,f', 'Help text goes here', 1, nil, '"edit", "The fooble:", 1, 1, 10, 50', true)
33skang.thing('bar', 'Help text', "Default") 33skang.thing('bar', 'Help text', "Default")
34skang.thing('foo') 34skang.thing('foo')
35 35
@@ -115,7 +115,6 @@ print(test.fooble .. ' ' .. test.f)
115print(skang.get(test, 'f', 'default')) 115print(skang.get(test, 'f', 'default'))
116print('') 116print('')
117 117
118
119local stuff = {} 118local stuff = {}
120stuff.t = {} 119stuff.t = {}
121 120
@@ -125,7 +124,7 @@ skang.thing{'c', module=stuff.t, help = 'Another sub stufflet'}
125print(skang.get(stuff, 'a', 'help')) 124print(skang.get(stuff, 'a', 'help'))
126print(skang.get(stuff.t, 'b', 'help')) 125print(skang.get(stuff.t, 'b', 'help'))
127print(skang.get(stuff.t, 'c', 'help')) 126print(skang.get(stuff.t, 'c', 'help'))
128skang.thing{'b', module=test, help = 'A test stufflet for test'} 127skang.thing{'baz,b', module=test, help = 'A test stufflet for test'}
129print(skang.get(test, 'b', 'help')) 128print(skang.get(test, 'b', 'help'))
130print(skang.get(test, 'f', 'help')) 129print(skang.get(test, 'f', 'help'))
131stuff.a = '1' 130stuff.a = '1'
@@ -133,12 +132,30 @@ stuff.t.b = '2'
133stuff.t.c = '3' 132stuff.t.c = '3'
134test.b = '422222' 133test.b = '422222'
135test.f = 5 134test.f = 5
135test_c.cbar = '666'
136-- This one doesn't actually exist.
137test_c.bar = '7'
138print('')
139
136print(skang.get(stuff, 'a')) 140print(skang.get(stuff, 'a'))
137print(skang.get(stuff.t, 'b')) 141print(skang.get(stuff.t, 'b'))
138print(skang.get(stuff.t, 'c')) 142print(skang.get(stuff.t, 'c'))
139print(skang.get(test, 'b')) 143print(skang.get(test, 'b'))
144print(skang.get(test, 'baz'))
140print(skang.get(test, 'f')) 145print(skang.get(test, 'f'))
141print(skang.get(test, 'fooble')) 146print(skang.get(test, 'fooble'))
147print(skang.get(test_c, 'cbar'))
148print(skang.get(test_c, 'bar'))
149print('')
150
142print(stuff.a) 151print(stuff.a)
143print(stuff.t.b) 152print(stuff.t.b)
144print(stuff.t.c) 153print(stuff.t.c)
154print(test.b)
155print(test.baz)
156print(test.f)
157print(test.fooble)
158print(test_c.cbar)
159print(test_c.bar)
160print(test_c.c)
161print(test_c.cfooble)