From 689aaf50b3cbd709cfdf4df17fec4ba119bfd222 Mon Sep 17 00:00:00 2001 From: grorp <82708541+grorp@users.noreply.github.com> Date: Fri, 8 Dec 2023 21:13:33 +0100 Subject: [PATCH] Fix unittest failure for release versions (#14067) --- games/devtest/mods/unittests/get_version.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/games/devtest/mods/unittests/get_version.lua b/games/devtest/mods/unittests/get_version.lua index 99ddcfde6..7ef78257d 100644 --- a/games/devtest/mods/unittests/get_version.lua +++ b/games/devtest/mods/unittests/get_version.lua @@ -7,6 +7,10 @@ unittests.register("test_get_version", function() assert(type(version.proto_min) == "number") assert(type(version.proto_max) == "number") assert(version.proto_max >= version.proto_min) - assert(type(version.hash) == "string") assert(type(version.is_dev) == "boolean") + if version.is_dev then + assert(type(version.hash) == "string") + else + assert(version.hash == nil) + end end)