summaryrefslogtreecommitdiff
path: root/src/tests/elua
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-07 11:56:59 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-07 11:56:59 +0100
commitb1eb5b56a627929f1f43ebd167c92e76eefe0847 (patch)
tree61e7b4c48d6b72327919a91c86197654914faaa0 /src/tests/elua
parent95a79d5f3bf3558fc671aad7b2c54f18a94b9f8c (diff)
elua: use a minimal app to avoid loading eolian at runtime
Otherwise it would fail on systems with no Eolian installed. @fix
Diffstat (limited to 'src/tests/elua')
-rw-r--r--src/tests/elua/data/apps/test.lua2
-rw-r--r--src/tests/elua/elua_lib.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/tests/elua/data/apps/test.lua b/src/tests/elua/data/apps/test.lua
new file mode 100644
index 0000000000..2e9bab1f2a
--- /dev/null
+++ b/src/tests/elua/data/apps/test.lua
@@ -0,0 +1,2 @@
1-- test elua app
2return true
diff --git a/src/tests/elua/elua_lib.c b/src/tests/elua/elua_lib.c
index 82857270db..bd959ca7b1 100644
--- a/src/tests/elua/elua_lib.c
+++ b/src/tests/elua/elua_lib.c
@@ -18,7 +18,7 @@ START_TEST(elua_api)
18 int fd; 18 int fd;
19 char *cargv[2]; 19 char *cargv[2];
20 char arg1[] = "test"; 20 char arg1[] = "test";
21 char arg2[] = "lualian"; 21 char arg2[] = "test";
22 int quit = 0; 22 int quit = 0;
23 cargv[0] = arg1; 23 cargv[0] = arg1;
24 cargv[1] = arg2; 24 cargv[1] = arg2;
@@ -69,7 +69,7 @@ START_TEST(elua_api)
69 fail_if(!elua_util_require(st, "util")); 69 fail_if(!elua_util_require(st, "util"));
70 fail_if(!elua_util_string_run(st, "return 1337", "foo")); 70 fail_if(!elua_util_string_run(st, "return 1337", "foo"));
71 fail_if(elua_util_string_run(st, "foo bar", "foo")); /* invalid code */ 71 fail_if(elua_util_string_run(st, "foo bar", "foo")); /* invalid code */
72 fail_if(elua_util_app_load(st, "lualian")); 72 fail_if(elua_util_app_load(st, "test"));
73 fail_if(lua_type(lst, -1) != LUA_TFUNCTION); 73 fail_if(lua_type(lst, -1) != LUA_TFUNCTION);
74 lua_pop(lst, 1); 74 lua_pop(lst, 1);
75 fail_if(!elua_util_app_load(st, "non_existent_app")); 75 fail_if(!elua_util_app_load(st, "non_existent_app"));