summaryrefslogtreecommitdiff
path: root/src/tests/efreet/main.c
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-08 23:45:48 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-08 23:45:48 +0000
commitf57968f1581e443472689488f26f8cd3bcede1cc (patch)
tree43e0c63094d122b2e50eb7e2af74b1373a497c4b /src/tests/efreet/main.c
parent90e4c429193f103005acfa16258100a8507c1b41 (diff)
efl/efreet: improve tests, fix bogus warning.
* tests will run locally now, not just from installed files. * efreet_init_new(NULL) is valid, actually used by efreet_desktop_save() SVN revision: 82428
Diffstat (limited to 'src/tests/efreet/main.c')
-rw-r--r--src/tests/efreet/main.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/tests/efreet/main.c b/src/tests/efreet/main.c
index 634431b1a8..083374402a 100644
--- a/src/tests/efreet/main.c
+++ b/src/tests/efreet/main.c
@@ -78,6 +78,32 @@ static Efreet_Test tests[] = {
78extern char **environ; 78extern char **environ;
79static Eina_List *environment = NULL; 79static Eina_List *environment = NULL;
80 80
81const char *ef_test_path_get(const char *component)
82{
83 static int is_local = -1;
84 static char buf[PATH_MAX];
85
86 if (is_local == -1)
87 {
88 struct stat st;
89 is_local = (stat(PACKAGE_BUILD_DIR"/src/tests/efreet/data/test.desktop", &st) == 0);
90 }
91
92 if (is_local)
93 {
94 eina_str_join(buf, sizeof(buf), '/',
95 PACKAGE_BUILD_DIR"/src/tests/efreet/data",
96 component);
97 }
98 else
99 {
100 eina_str_join(buf, sizeof(buf), '/', PACKAGE_DATA_DIR "/tests",
101 component);
102 }
103
104 return buf;
105}
106
81void 107void
82environment_store(void) 108environment_store(void)
83{ 109{