Lua: refactored and extracted test approach

This commit is contained in:
Zef Hemel
2025-01-15 20:47:58 +01:00
parent 5604f6d8c2
commit bc1bdea396
12 changed files with 430 additions and 346 deletions
+9
View File
@@ -0,0 +1,9 @@
local function assert_equal(a, b)
if a ~= b then
error("Assertion failed: " .. a .. " is not equal to " .. b)
end
end
-- Basic OS functions
assert(os.time() > 0)
assert(os.date("%Y-%m-%d", os.time({ year = 2020, month = 1, day = 1 })) == "2020-01-01")