diff options
author | David Walter Seikel | 2014-03-28 03:20:57 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-03-28 03:20:57 +1000 |
commit | 0d31077404dd87f4874c2db2acc9732f2412d91f (patch) | |
tree | ed95b2f10f826f6c3d212ffee3ad9a364fb5b211 /ClientHamr/GuiLua/test.lua | |
parent | A new csv2table() function. (diff) | |
download | SledjHamr-0d31077404dd87f4874c2db2acc9732f2412d91f.zip SledjHamr-0d31077404dd87f4874c2db2acc9732f2412d91f.tar.gz SledjHamr-0d31077404dd87f4874c2db2acc9732f2412d91f.tar.bz2 SledjHamr-0d31077404dd87f4874c2db2acc9732f2412d91f.tar.xz |
Rewrite skang.thing() to allow positional and named arguments, allow changing Things, plus some more tweaks.
Diffstat (limited to '')
-rw-r--r-- | ClientHamr/GuiLua/test.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ClientHamr/GuiLua/test.lua b/ClientHamr/GuiLua/test.lua index b1ab691..2115098 100644 --- a/ClientHamr/GuiLua/test.lua +++ b/ClientHamr/GuiLua/test.lua | |||
@@ -87,7 +87,10 @@ print(skang.isBoolean('Nope')) | |||
87 | print(skang.isBoolean(function (a) return false end)) | 87 | print(skang.isBoolean(function (a) return false end)) |
88 | print('') | 88 | print('') |
89 | 89 | ||
90 | -- Make it required, even though it was anyway. | ||
91 | skang.thing{'f', required = true} | ||
90 | -- First, disable the default value, so we see "is required" errors. | 92 | -- First, disable the default value, so we see "is required" errors. |
93 | -- Coz using the above syntax means that default is never passed to skang.thing, since it's nil. | ||
91 | skang.things.f.default = nil | 94 | skang.things.f.default = nil |
92 | test.fooble = 42 | 95 | test.fooble = 42 |
93 | test.fooble = 'Should fail.' | 96 | test.fooble = 'Should fail.' |