summaryrefslogtreecommitdiff
path: root/src/tests/elua
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-04-16 15:08:02 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-06 15:05:21 +0100
commit75dd60d62d90efde12e5067d08df816e13de203a (patch)
tree090e2b297159ecf3a522251c8090a13982cb85d5 /src/tests/elua
parente77ba60a5829136bd393f3b434c91427640ac20e (diff)
elua lib: test elua_state_dirs_fill
Diffstat (limited to 'src/tests/elua')
-rw-r--r--src/tests/elua/elua_lib.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/tests/elua/elua_lib.c b/src/tests/elua/elua_lib.c
index cfe123657c..60e068cbc9 100644
--- a/src/tests/elua/elua_lib.c
+++ b/src/tests/elua/elua_lib.c
@@ -19,8 +19,17 @@ START_TEST(elua_api)
19 st = elua_state_new("test"); 19 st = elua_state_new("test");
20 fail_if(!st); 20 fail_if(!st);
21 21
22 /* test env vars */
23 setenv("ELUA_CORE_DIR", "foo", 1);
24 setenv("ELUA_MODULES_DIR", "bar", 1);
25 setenv("ELUA_APPS_DIR", "baz", 1);
26 elua_state_dirs_fill(st, EINA_FALSE);
27 fail_if(strcmp(elua_state_core_dir_get(st), "foo"));
28 fail_if(strcmp(elua_state_mod_dir_get(st), "bar"));
29 fail_if(strcmp(elua_state_apps_dir_get(st), "baz"));
30
31 /* now fill it properly */
22 elua_state_dirs_set(st, ELUA_CORE_DIR, ELUA_MODULES_DIR, ELUA_APPS_DIR); 32 elua_state_dirs_set(st, ELUA_CORE_DIR, ELUA_MODULES_DIR, ELUA_APPS_DIR);
23
24 fail_if(strcmp(elua_state_core_dir_get(st), ELUA_CORE_DIR)); 33 fail_if(strcmp(elua_state_core_dir_get(st), ELUA_CORE_DIR));
25 fail_if(strcmp(elua_state_mod_dir_get(st), ELUA_MODULES_DIR)); 34 fail_if(strcmp(elua_state_mod_dir_get(st), ELUA_MODULES_DIR));
26 fail_if(strcmp(elua_state_apps_dir_get(st), ELUA_APPS_DIR)); 35 fail_if(strcmp(elua_state_apps_dir_get(st), ELUA_APPS_DIR));