summaryrefslogtreecommitdiff
path: root/src/tests/eio
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-12-15 14:30:33 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-12-15 14:30:33 -0800
commitb221fbc6390dc71b5800142364f2dd042e810610 (patch)
tree093e858dc258b5e049bf80ffdbcbaf7c8c1e4124 /src/tests/eio
parentb3cc37dd7788b2c99bd8a05da7bf9fb02972d3ab (diff)
eio: fix attr tests to process an array of string.
Diffstat (limited to 'src/tests/eio')
-rw-r--r--src/tests/eio/eio_test_manager_xattr.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/tests/eio/eio_test_manager_xattr.c b/src/tests/eio/eio_test_manager_xattr.c
index e70d9ef5ff..b858de6534 100644
--- a/src/tests/eio/eio_test_manager_xattr.c
+++ b/src/tests/eio/eio_test_manager_xattr.c
@@ -38,17 +38,24 @@ int total_attributes = sizeof(attribute)/sizeof(attribute[0]);
38static void 38static void
39_main_cb(void *data, const Efl_Event *ev) 39_main_cb(void *data, const Efl_Event *ev)
40{ 40{
41 Efl_Future_Event_Success *success = ev->info; 41 Efl_Future_Event_Progress *progress = ev->info;
42 const char* attr = success->value; 42 const Eina_Array *attrs = progress->progress;
43 const char* attr;
43 int *num_of_attr = (int *)data; 44 int *num_of_attr = (int *)data;
44 unsigned int i; 45 unsigned int i, j;
46 Eina_Array_Iterator it;
45 47
46 for (i = 0; i < sizeof (attribute) / sizeof (attribute[0]); ++i) 48 EINA_ARRAY_ITER_NEXT(attrs, j, attr, it)
47 if (strcmp(attr, attribute[i]) == 0) 49 {
48 { 50 for (i = 0; i < sizeof (attribute) / sizeof (attribute[0]); ++i)
49 (*num_of_attr)++; 51 {
50 break; 52 if (strcmp(attr, attribute[i]) == 0)
51 } 53 {
54 (*num_of_attr)++;
55 break;
56 }
57 }
58 }
52} 59}
53 60
54static void 61static void
@@ -75,8 +82,6 @@ _done_get_cb(void *data EINA_UNUSED, const Efl_Event *ev)
75 fail_if(!buf); 82 fail_if(!buf);
76 fail_if(strcmp((const char*) eina_binbuf_string_get(buf), 83 fail_if(strcmp((const char*) eina_binbuf_string_get(buf),
77 attr_data[i]) != 0); 84 attr_data[i]) != 0);
78
79 i++;
80 } 85 }
81 86
82 fail_if(i != total_attributes); 87 fail_if(i != total_attributes);