Increase code coverage for Lua libraries

Add test coverage for lua libraries
Remove dead code in Lua implementation

Signed-off-by: Don Brady <don.brady@delphix.com>
This commit is contained in:
Don Brady
2018-02-08 09:31:15 -07:00
committed by Brian Behlendorf
parent ee00bfb2e6
commit fc5d4b6737
17 changed files with 1372 additions and 696 deletions
+4 -1
View File
@@ -174,6 +174,7 @@ static int str_char (lua_State *L) {
}
#if defined(LUA_USE_DUMP)
static int writer (lua_State *L, const void* b, size_t size, void* B) {
(void)L;
luaL_addlstring((luaL_Buffer*) B, (const char *)b, size);
@@ -191,7 +192,7 @@ static int str_dump (lua_State *L) {
luaL_pushresult(&b);
return 1;
}
#endif
/*
@@ -992,7 +993,9 @@ static int str_format (lua_State *L) {
static const luaL_Reg strlib[] = {
{"byte", str_byte},
{"char", str_char},
#if defined(LUA_USE_DUMP)
{"dump", str_dump},
#endif
{"find", str_find},
{"format", str_format},
{"gmatch", str_gmatch},