mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-07-25 08:28:12 +02:00
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>
10 lines
287 B
Diff
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)
|