1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-12-08 16:35:31 +01:00

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)
This commit is contained in:
Desour
2025-12-03 15:42:29 +01:00
committed by SmallJoker
parent cc16a55d78
commit 5f468eae21

View File

@@ -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)