gentoo-ebuilds/dev-build/bmake/files/bmake-20250618-lua-test.patch
Jakov Smolić 0ec76c9115
dev-build/bmake: add 20250618
Add a patch to make lua test compatible with lua-5.1
os.exit() function in lua-5.4 accepts first argument as either boolean
or number [1], while 5.1 only accepts number [2]; so update the function
call to be compatible with both versions. While at it, add lua as a test
dependency.

[1] https://www.lua.org/manual/5.1/manual.html#pdf-os.exit
[2] https://www.lua.org/manual/5.4/manual.html#pdf-os.exit

Bug: https://bugs.gentoo.org/959269
Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
2025-07-01 03:17:19 +02:00

10 lines
287 B
Diff

# https://bugs.gentoo.org/959269#c4
# make the test compatible with lua-5.1
--- a/unit-tests/check-expect.lua
+++ b/unit-tests/check-expect.lua
@@ -187,4 +187,4 @@ end
for _, fname in ipairs(arg) do
check_mk(fname)
end
-os.exit(not had_errors)
+os.exit((not had_errors) and 0 or 1)