From 1507e8b4983b9c698cfa67131005a5a9d9c533f6 Mon Sep 17 00:00:00 2001 From: Anton Shestakov Date: Sat, 9 Jul 2016 00:53:46 +0800 Subject: test_util_multitable: make mt variable local [luacheck] --- tests/test_util_multitable.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_util_multitable.lua b/tests/test_util_multitable.lua index 71a83450..4a8dd14c 100644 --- a/tests/test_util_multitable.lua +++ b/tests/test_util_multitable.lua @@ -8,7 +8,7 @@ function new(new, multitable) - mt = new(); + local mt = new(); assert_table(mt, "Multitable is a table"); assert_function(mt.add, "Multitable has method add"); assert_function(mt.get, "Multitable has method get"); @@ -40,7 +40,7 @@ function get(get, multitable) return assert_equal(select(2, has_items(list, ...)), "has-all", message or "List has all expected items, and no more", 2); end - mt = multitable.new(); + local mt = multitable.new(); local trigger1, trigger2, trigger3 = {}, {}, {}; local item1, item2, item3 = {}, {}, {}; -- cgit v1.2.3 From f6a1c987cebc02bff835b471054b8065fa0c9ab0 Mon Sep 17 00:00:00 2001 From: Anton Shestakov Date: Sat, 9 Jul 2016 00:56:32 +0800 Subject: test_util_jid: make function test() local [luacheck] --- tests/test_util_jid.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_util_jid.lua b/tests/test_util_jid.lua index c697e63f..0ac5827e 100644 --- a/tests/test_util_jid.lua +++ b/tests/test_util_jid.lua @@ -19,7 +19,7 @@ end function split(split) - function test(input_jid, expected_node, expected_server, expected_resource) + local function test(input_jid, expected_node, expected_server, expected_resource) local rnode, rserver, rresource = split(input_jid); assert_equal(expected_node, rnode, "split("..tostring(input_jid)..") failed"); assert_equal(expected_server, rserver, "split("..tostring(input_jid)..") failed"); -- cgit v1.2.3