diff options
author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2022-01-13 22:12:01 +0300 |
---|---|---|
committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2022-02-13 11:42:34 +0300 |
commit | 57253b2912facf2b078106a1dbcbed1a24c660e3 (patch) | |
tree | a89d81b33c350d1fed3c3c2d81b193b197b55470 /spec | |
parent | 4ea8daeb7478487ff32a03d97d5ded16785018d8 (diff) |
fix(utils.enum) don't allow varargs with nils
Diffstat (limited to 'spec')
-rw-r--r-- | spec/utils-enum_spec.lua | 4 |
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) |