Rework binmodule example to silence unit test console output
This commit is contained in:
parent
82f04b8b1d
commit
c3b0da7894
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
static int example_test(lua_State* L)
|
static int example_test(lua_State* L)
|
||||||
{
|
{
|
||||||
const char* text = luaL_checkstring(L, 1);
|
lua_pushstring(L, "hello ");
|
||||||
printf("%s\n", text);
|
lua_pushvalue(L, 1);
|
||||||
lua_pushboolean(L, 1);
|
lua_concat(L, 2);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,5 +14,6 @@
|
|||||||
|
|
||||||
|
|
||||||
function suite.testExample()
|
function suite.testExample()
|
||||||
test.istrue(example.test("hello world"));
|
local result = example.test("world")
|
||||||
|
test.isequal("hello world", result)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user