ecore_imf - fix make check to doa "load all" check after de-sillifying it
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Fri, 5 Aug 2016 04:40:30 +0000 (13:40 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Fri, 5 Aug 2016 04:42:11 +0000 (13:42 +0900)
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.

src/lib/ecore_imf/ecore_imf_module.c
src/tests/ecore/ecore_test_ecore_imf.c

index 9deede1..1d5747e 100644 (file)
@@ -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;
index 486aa46..95c3b65 100644 (file)
@@ -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);