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

github.com/stevedonovan/Penlight.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2022-01-13 22:12:01 +0300
committerThijs Schreijer <thijs@thijsschreijer.nl>2022-02-13 11:42:34 +0300
commit57253b2912facf2b078106a1dbcbed1a24c660e3 (patch)
treea89d81b33c350d1fed3c3c2d81b193b197b55470 /spec
parent4ea8daeb7478487ff32a03d97d5ded16785018d8 (diff)
fix(utils.enum) don't allow varargs with nils
Diffstat (limited to 'spec')
-rw-r--r--spec/utils-enum_spec.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/utils-enum_spec.lua b/spec/utils-enum_spec.lua
index 21fde62..dbe6954 100644
--- a/spec/utils-enum_spec.lua
+++ b/spec/utils-enum_spec.lua
@@ -24,6 +24,10 @@ describe("pl.utils", function ()
assert.has.error(function()
t = enum("hello", true, "world")
end, "argument 2 expected a 'string', got a 'boolean'")
+ -- no holes
+ assert.has.error(function()
+ t = enum("hello", nil, "world")
+ end, "argument 2 expected a 'string', got a 'nil'")
end)