Skip to content

Commit 48d51eb

Browse files
committed
tests: add test for len
1 parent 1f362be commit 48d51eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ziglua.zig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2202,6 +2202,9 @@ test "string buffers" {
22022202
std.mem.copy(u8, b, "defghijklmnopqrstuvwxyz");
22032203
buffer.pushResultSize(23);
22042204
try expectEqualStrings("abcdefghijklmnopqrstuvwxyz", lua.toString(-1).?);
2205+
2206+
lua.len(-1);
2207+
try expectEqual(@as(Integer, 26), lua.toInteger(-1));
22052208
}
22062209

22072210
test "global table" {
@@ -2337,7 +2340,6 @@ test "refs" {
23372340
_ = Lua.getMetatable;
23382341
_ = Lua.isUserdata;
23392342
_ = Lua.isYieldable;
2340-
_ = Lua.len;
23412343
_ = Lua.load;
23422344
_ = Lua.newThread;
23432345
_ = Lua.newUserdataUV;

0 commit comments

Comments
 (0)