From: Carsten Haitzler (Rasterman) Date: Fri, 5 Aug 2016 04:40:30 +0000 (+0900) Subject: ecore_imf - fix make check to doa "load all" check after de-sillifying it X-Git-Tag: upstream/1.20.0~4926 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=013c0702f410796667020b0cd0c473f077887cf3;p=platform%2Fupstream%2Fefl.git ecore_imf - fix make check to doa "load all" check after de-sillifying it this should make ecore_imf testable with empty env vars also meaning no env var and the make check test will now ensuree this is set to exactly test this. --- diff --git a/src/lib/ecore_imf/ecore_imf_module.c b/src/lib/ecore_imf/ecore_imf_module.c index 9deede1..1d5747e 100644 --- a/src/lib/ecore_imf/ecore_imf_module.c +++ b/src/lib/ecore_imf/ecore_imf_module.c @@ -69,7 +69,7 @@ ecore_imf_module_init(void) modules_load = built_modules; env = getenv("ECORE_IMF_MODULE"); - if (env) + if ((env) && (env[0])) { modules_one[0] = env; modules_load = modules_one; @@ -99,7 +99,7 @@ ecore_imf_module_init(void) if ((!env) && (!getenv("WAYLAND_DISPLAY")) && (getenv("DISPLAY"))) env = "xim"; #endif - if (env) + if ((env) && (env[0])) { const char **itr; Eina_Bool ok = EINA_FALSE; diff --git a/src/tests/ecore/ecore_test_ecore_imf.c b/src/tests/ecore/ecore_test_ecore_imf.c index 486aa46..95c3b65 100644 --- a/src/tests/ecore/ecore_test_ecore_imf.c +++ b/src/tests/ecore/ecore_test_ecore_imf.c @@ -47,6 +47,7 @@ START_TEST(ecore_test_ecore_imf_modules) Eina_List *modules; const char **itr; + putenv("ECORE_IMF_MODULE="); ecore_imf_init(); modules = ecore_imf_context_available_ids_get(); @@ -64,10 +65,10 @@ END_TEST START_TEST(ecore_test_ecore_imf_modules_load) { - const char **itr; + const char **itr, *env; + putenv("ECORE_IMF_MODULE="); ecore_imf_init(); - for (itr = built_modules; *itr != NULL; itr++) { Ecore_IMF_Context *ctx = ecore_imf_context_add(*itr);