diff options
| author | OpportunityLiu <[email protected]> | 2019-07-26 16:25:52 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-07-28 14:45:01 +0800 |
| commit | d3667d71c86861ffb910af8ba8ecd930f75bf9e7 (patch) | |
| tree | 5a0014b413aae30fc60d2d084aac98c9575eddf7 /tests/modules/string/serialize/test.lua | |
| parent | cff42b3aeb348d0a193c24f244ddec003aded06f (diff) | |
fix up value
Diffstat (limited to 'tests/modules/string/serialize/test.lua')
| -rw-r--r-- | tests/modules/string/serialize/test.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/modules/string/serialize/test.lua b/tests/modules/string/serialize/test.lua index ab8986867..66b216566 100644 --- a/tests/modules/string/serialize/test.lua +++ b/tests/modules/string/serialize/test.lua @@ -42,6 +42,9 @@ function test_function(t) t:are_equal(roundtrip(function() return {{1, 2, 3, nil, 4}} end)(), {{1, 2, 3, nil, 4}}) t:are_equal(roundtrip({function() return {{1, 2, 3, nil, 4}} end})[1](), {{1, 2, 3, nil, 4}}) t:are_equal(roundtrip({{function() return {{1, 2, 3, nil, 4}} end}})[1][1](), {{1, 2, 3, nil, 4}}) + + t:will_raise(function() string.serialize({io.open}):deserialize()[1]("test.lua") end, "attempt to call global 'setmetatable' (a nil value)") + t:will_raise(function() string.serialize({io.open}):deserialize()[1]("not/a/file") end, "failed to open file: not/a/file") end function test_refloop(t) |
