summaryrefslogtreecommitdiff
path: root/tests/C/lua_pushnil.c
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-15 17:52:46 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-15 17:57:10 +0100
commit43474e4c411709e3c1ab1b1d13283d2bc4789d1d (patch)
treede0e6767f9a5348ddcd58d1ac80c24688125d262 /tests/C/lua_pushnil.c
parentc428f1241ebd5194a37c37d9d5376b326b78ee37 (diff)
downloadfengari-43474e4c411709e3c1ab1b1d13283d2bc4789d1d.tar.gz
fengari-43474e4c411709e3c1ab1b1d13283d2bc4789d1d.tar.bz2
fengari-43474e4c411709e3c1ab1b1d13283d2bc4789d1d.zip
lapi tests
Diffstat (limited to 'tests/C/lua_pushnil.c')
-rw-r--r--tests/C/lua_pushnil.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/C/lua_pushnil.c b/tests/C/lua_pushnil.c
new file mode 100644
index 0000000..bb31246
--- /dev/null
+++ b/tests/C/lua_pushnil.c
@@ -0,0 +1,21 @@
+#include <lua.h>
+#include <lualib.h>
+#include <lauxlib.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+int main(void) {
+
+ lua_State *L = luaL_newstate();
+
+ luaL_openlibs(L);
+
+ lua_pushnil(L);
+
+ printf("L->top(%d): %s\n", lua_gettop(L), luaL_typename(L, lua_gettop(L)));
+
+ lua_close(L);
+
+ return 0;
+
+} \ No newline at end of file