Rework binmodule example to silence unit test console output

This commit is contained in:
Jason Perkins 2017-08-10 14:40:45 -04:00
parent 82f04b8b1d
commit c3b0da7894
2 changed files with 5 additions and 4 deletions

View File

@ -3,9 +3,9 @@
static int example_test(lua_State* L)
{
const char* text = luaL_checkstring(L, 1);
printf("%s\n", text);
lua_pushboolean(L, 1);
lua_pushstring(L, "hello ");
lua_pushvalue(L, 1);
lua_concat(L, 2);
return 1;
}

View File

@ -14,5 +14,6 @@
function suite.testExample()
test.istrue(example.test("hello world"));
local result = example.test("world")
test.isequal("hello world", result)
end