From 5f468eae21116a31d637d170fd9516c5a5879e75 Mon Sep 17 00:00:00 2001 From: Desour Date: Wed, 3 Dec 2025 15:42:29 +0100 Subject: [PATCH] Add order check in unittest for `privs_to_string` Order guarantee was added in: https://github.com/luanti-org/luanti/pull/15023 (b2f6a65) The unittest used to wrongly depend on order, fixed by: https://github.com/luanti-org/luanti/pull/9184 (1173ff0) --- builtin/common/tests/misc_helpers_spec.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/common/tests/misc_helpers_spec.lua b/builtin/common/tests/misc_helpers_spec.lua index 59eb4ec5fc..e4cd25c2d8 100644 --- a/builtin/common/tests/misc_helpers_spec.lua +++ b/builtin/common/tests/misc_helpers_spec.lua @@ -57,7 +57,9 @@ describe("privs", function() assert.equal("one", core.privs_to_string({ one=true })) local ret = core.privs_to_string({ a=true, b=true }) - assert(ret == "a,b" or ret == "b,a") + assert(ret == "a,b") + ret = core.privs_to_string({ e=true, c=true, d=true, a=true, b=true }) + assert(ret == "a,b,c,d,e") end) end)