diff options
author | Kim Alvefur <zash@zash.se> | 2020-01-14 23:39:47 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-01-14 23:39:47 +0100 |
commit | 21e4b6cb9f41b478583c71a810399efa7e3f5267 (patch) | |
tree | 80543f3a72eeb61f3f847f7bca5fd3e8d0896d36 | |
parent | da1edea68ef8fc9eb3b5483f1ce97e9586936ba6 (diff) | |
download | prosody-21e4b6cb9f41b478583c71a810399efa7e3f5267.tar.gz prosody-21e4b6cb9f41b478583c71a810399efa7e3f5267.zip |
util.array: Add a test case for a behavior change in Lua 5.3
In Lua 5.1 and 5.2 the __eq metamethod is not invoked if the other
argument is of a different metatable, but in Lua 5.3 it is.
-rw-r--r-- | spec/util_array_spec.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/util_array_spec.lua b/spec/util_array_spec.lua index 04d0cc28..1d9da947 100644 --- a/spec/util_array_spec.lua +++ b/spec/util_array_spec.lua @@ -43,6 +43,7 @@ describe("util.array", function () local b = array({ "c", "d" }); assert.truthy(a1 == a2); assert.falsy(a1 == b); + assert.falsy(a1 == { "a", "b" }, "Behavior of metatables changed in Lua 5.3"); end); end); |