From a8083c0397a20233866b4f69a3e393d843fb417d Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Fri, 5 May 2017 14:29:15 +0200 Subject: L.openupval list was not linked correctly --- tests/test-suite/calls.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/test-suite') diff --git a/tests/test-suite/calls.js b/tests/test-suite/calls.js index 2c1dc7a..08e72cc 100644 --- a/tests/test-suite/calls.js +++ b/tests/test-suite/calls.js @@ -389,6 +389,16 @@ test("[test-suite] calls: test for generic load", function (t) { end a = assert(load(read1(x), "modname", "t", _G)) + assert(a() == "\0" and _G.x == 33) + assert(debug.getinfo(a).source == "modname") + -- cannot read text in binary mode + -- cannotload("attempt to load a text chunk", load(read1(x), "modname", "b", {})) + -- cannotload("attempt to load a text chunk", load(x, "modname", "b")) + + a = assert(load(function () return nil end)) + a() -- empty chunk + + assert(not load(function () return true end)) `, L; t.plan(1); -- cgit v1.2.3-54-g00ecf