summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-04-16 15:36:17 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-06 15:05:21 +0100
commit5bfa8e8b142ae010b9557f1025c2ecf15c97e750 (patch)
treef94ba48fbb680710709257723cfff8e962f91eef
parent07133df0b59a176c6ad895c4c3010d33fcad8a71 (diff)
downloadefl-5bfa8e8b142ae010b9557f1025c2ecf15c97e750.tar.gz
elua lib: test raw file load
-rw-r--r--src/tests/elua/elua_lib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tests/elua/elua_lib.c b/src/tests/elua/elua_lib.c
index 4bf77962d1..aa4e1be340 100644
--- a/src/tests/elua/elua_lib.c
+++ b/src/tests/elua/elua_lib.c
@@ -65,6 +65,12 @@ START_TEST(elua_api)
fail_if(elua_util_app_load(st, "non_existent_app"));
fail_if(lua_type(lst, -1) != LUA_TSTRING);
lua_pop(lst, 1);
+ fail_if(elua_io_loadfile(st, ELUA_CORE_DIR "/util.lua"));
+ fail_if(lua_type(lst, -1) != LUA_TFUNCTION);
+ lua_pop(lst, 1);
+ fail_if(!elua_io_loadfile(st, ELUA_CORE_DIR "/non_existent_file.lua"));
+ fail_if(lua_type(lst, -1) != LUA_TSTRING);
+ lua_pop(lst, 1);
/* halfassed testing here, but not possible otherwise */
fail_if(elua_util_error_report(st, "foo", 0));