summaryrefslogtreecommitdiff
path: root/tests/test-suite
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-05 14:29:15 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-05 14:49:53 +0200
commita8083c0397a20233866b4f69a3e393d843fb417d (patch)
tree47d4f18aac1e0f43abe5ac8db3cd0715c89fe401 /tests/test-suite
parentc421f2bc81f1f1c711591a0ad0308d9eb5adb812 (diff)
downloadfengari-a8083c0397a20233866b4f69a3e393d843fb417d.tar.gz
fengari-a8083c0397a20233866b4f69a3e393d843fb417d.tar.bz2
fengari-a8083c0397a20233866b4f69a3e393d843fb417d.zip
L.openupval list was not linked correctly
Diffstat (limited to 'tests/test-suite')
-rw-r--r--tests/test-suite/calls.js10
1 files changed, 10 insertions, 0 deletions
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);