Skip to content

encode_keep_buffer test fails with Lua 5.5 #120

@mcepl

Description

@mcepl

While enabling Lua 5.5 builds for all our packages in openSUSE, I was hit by this failed test when running the test suite:

[    5s] Executing(%check): /usr/bin/bash -e /var/tmp/rpm-tmp.o7eCaZ
[    5s] + umask 022
[    5s] + cd /home/abuild/rpmbuild/BUILD/lua55-cjson-2.1.0.16-build
[    5s] + cd lua-cjson-2.1.0.16
[    5s] + rm -rf build
[    5s] + export 'LUA_CPATH=/home/abuild/rpmbuild/BUILD/lua55-cjson-2.1.0.16-build/BUILDROOT/usr/lib64/lua/5.5/?.so;;'
[    5s] + LUA_CPATH='/home/abuild/rpmbuild/BUILD/lua55-cjson-2.1.0.16-build/BUILDROOT/usr/lib64/lua/5.5/?.so;;'
[    5s] + export 'LUA_PATH=/home/abuild/rpmbuild/BUILD/lua55-cjson-2.1.0.16-build/BUILDROOT/usr/share/lua/5.5/?.lua;/home/abuild/rpmbuild/BUILD/lua55-cjson-2.1.0.16-build/BUILDROOT/usr/share/lua/5.5/?/init.lua;;'
[    5s] + LUA_PATH='/home/abuild/rpmbuild/BUILD/lua55-cjson-2.1.0.16-build/BUILDROOT/usr/share/lua/5.5/?.lua;/home/abuild/rpmbuild/BUILD/lua55-cjson-2.1.0.16-build/BUILDROOT/usr/share/lua/5.5/?/init.lua;;'
[    5s] + cd tests
[    5s] + set -o pipefail
[    5s] + perl ./genutf8.pl
[    5s] + lua -e 'print("Testing Lua CJSON version " .. require("cjson")._VERSION)'
[    5s] Testing Lua CJSON version 2.1.0.11
[    5s] + ./test.lua
[    5s] + grep -E -A 3 'FAIL|Summary'
[    5s] + cut -c -150
[    5s] ==> Test [95] Set encode_keep_buffer(nil, true) [throw error]: FAIL
[    5s] [Input] { nil, true }
[    5s] [Expected:error] { ONE_OF{ "bad argument #2 to '?' (found too many arguments)", "bad argument #2 to 'cjson.encode_keep_buffer' (found too many argumen
[    5s] [Received:success] { true }
[    5s] --
[    5s] ==> Summary: 1/105 tests failed

(I cannot use ./runtests.sh, because I need to test on library already build and installed to temporary location; also, it seems that the version number has not been updated, but that is not important).

Tests pass on Lua 5.3, Lua 5.4, and with OpenResty/LuaJIT

Complete build log with all details of packages used and steps for reproduction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions