-utc_eina_xattr_double_get.c
-utc_eina_xattr_double_set.c
-utc_eina_xattr_fd_ls.c
-utc_eina_xattr_get.c
-utc_eina_xattr_int_get.c
-utc_eina_xattr_int_set.c
-utc_eina_xattr_ls.c
-utc_eina_xattr_set.c
-utc_eina_xattr_string_get.c
-utc_eina_xattr_string_set.c
-utc_eina_xattr_value_fd_ls.c
-utc_eina_xattr_value_ls.c
utc_eina_xattr_functional.c
-utc_eina_xattr_double_get.c
-utc_eina_xattr_double_set.c
-utc_eina_xattr_fd_ls.c
-utc_eina_xattr_get.c
-utc_eina_xattr_int_get.c
-utc_eina_xattr_int_set.c
-utc_eina_xattr_ls.c
-utc_eina_xattr_set.c
-utc_eina_xattr_string_get.c
-utc_eina_xattr_string_set.c
-utc_eina_xattr_value_fd_ls.c
-utc_eina_xattr_value_ls.c
utc_eina_xattr_functional.c
-utc_eina_xattr_double_get.c
-utc_eina_xattr_double_set.c
-utc_eina_xattr_fd_ls.c
-utc_eina_xattr_get.c
-utc_eina_xattr_int_get.c
-utc_eina_xattr_int_set.c
-utc_eina_xattr_ls.c
-utc_eina_xattr_set.c
-utc_eina_xattr_string_get.c
-utc_eina_xattr_string_set.c
-utc_eina_xattr_value_fd_ls.c
-utc_eina_xattr_value_ls.c
-#utc_eina_xattr_functional.c
+utc_eina_xattr_functional.c
-utc_eina_xattr_double_get.c
-utc_eina_xattr_double_set.c
-utc_eina_xattr_fd_ls.c
-utc_eina_xattr_get.c
-utc_eina_xattr_int_get.c
-utc_eina_xattr_int_set.c
-utc_eina_xattr_ls.c
-utc_eina_xattr_set.c
-utc_eina_xattr_string_get.c
-utc_eina_xattr_string_set.c
-utc_eina_xattr_value_fd_ls.c
-utc_eina_xattr_value_ls.c
-#utc_eina_xattr_functional.c
+utc_eina_xattr_functional.c
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_double_get eina_xattr_double_get()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- eina_init();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_double_get
- * @{
- * @objective Positive Test case 01: Get a double from an extended attribute properties.
- * @n Input Data:
- * @li file The file to get the double from;
- * @li attribute The attribute to set;
- * @li value Where to put the extracted value;
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create "user.mime_type" extended attribute of the file.
- * @step 3 Set the double for "user.comment" extended attribute properties of the file.
- * @step 4 Get the double from the "user.comment" extended attribute properties of the file.
- * @step 5 Compare set double with returned double.
- *
- * @passcondition: Test passes if EINA_TRUE is returned, gotten and set double are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_eina_xattr_double_get_p_1)
-{
- FILE * file = NULL;
- file = fopen("eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
-
- const char* data = "data";
- double PI = 3.14;
-
- if (!eina_xattr_set("eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Bool is_set = EINA_FALSE;
- is_set = eina_xattr_double_set("eina_file", "user.comment", PI, EINA_XATTR_INSERT);
-
- double returned_double;
- Eina_Bool is_get = eina_xattr_double_get("eina_file", "user.comment", &returned_double);
- if ((is_set == EINA_TRUE) && (returned_double == PI) && (is_get == EINA_TRUE))
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
- }
-
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
- Suite *suite = suite_create("utc_eina_xattr_double_get");
-
- TCase *tcase = tcase_create("TCase");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_xattr_double_get_p_1);
- suite_add_tcase(suite, tcase);
-
- return suite;
-}
-
-int
-main()
-{
- int number_failed;
-
- Suite *suite = test_suite();
- SRunner *srunner = srunner_create(suite);
- srunner_set_log(srunner, "utc_eina_xattr_double_get.log");
- srunner_set_xml(srunner, "utc_eina_xattr_double_get.xml");
- srunner_run_all(srunner, CK_NORMAL);
- number_failed = srunner_ntests_failed(srunner);
- srunner_free(srunner);
-
- return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_double_set eina_xattr_double_set()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- eina_init();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_double_set
- * @{
- * @objective Positive Test case 01: Set a double as a extended attribute properties.
- * @n Input Data:
- * @li file The file to set the double to;
- * @li attribute The attribute to set;
- * @li value The double to set;
- * @li flags Define the set policy.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create "user.mime_type" extended attribute of the file.
- * @step 3 Set the double for "user.comment" extended attribute properties of the file.
- * @step 4 Get the double from the "user.comment" extended attribute properties of the file.
- * @step 5 Compare set double with returned double.
- *
- * @passcondition: Test passes if EINA_TRUE is returned, gotten and set double are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_eina_xattr_double_set_p_1)
-{
- FILE * file = NULL;
- file = fopen("eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
-
- const char* data = "data";
- double PI = 3.14;
-
- if (!eina_xattr_set("eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Bool is_set = EINA_FALSE;
- is_set = eina_xattr_double_set("eina_file", "user.comment", PI, EINA_XATTR_INSERT);
-
- double returned_double;
- Eina_Bool is_get = eina_xattr_double_get("eina_file", "user.comment", &returned_double);
- if ((is_set == EINA_TRUE) && (returned_double == PI) && (is_get == EINA_TRUE))
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
- }
-
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
- Suite *suite = suite_create("utc_eina_xattr_double_set");
-
- TCase *tcase = tcase_create("TCase");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_xattr_double_set_p_1);
- suite_add_tcase(suite, tcase);
-
- return suite;
-}
-
-int
-main()
-{
- int number_failed;
-
- Suite *suite = test_suite();
- SRunner *srunner = srunner_create(suite);
- srunner_set_log(srunner, "utc_eina_xattr_double_set.log");
- srunner_set_xml(srunner, "utc_eina_xattr_double_set.xml");
- srunner_run_all(srunner, CK_NORMAL);
- number_failed = srunner_ntests_failed(srunner);
- srunner_free(srunner);
-
- return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_fd_ls eina_xattr_fd_ls()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- eina_init();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_fd_ls
- * @{
- * @objective Positive Test case 01: Get an iterator that list all extended attribute related to a fd.
- * @n Input Data:
- * @li fd The file descriptor to retrieve the extended attribute list from.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Get the file descriptor.
- * @step 3 Create "user.mime_type" extended attribute of the file.
- * @step 4 Get an iterator that list all extended attribute related to a fd.
- *
- * @passcondition: Test passes if iterator is not NULL and no segmentation fault.
- * @}
- */
-START_TEST(utc_eina_xattr_fd_ls_p_1)
-{
- FILE * file = NULL;
- file = fopen("eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- const char* data = "data";
- int fd = fileno(file);
-
- if (!eina_xattr_set("eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Iterator* it = eina_xattr_fd_ls(fd);
- if (it != NULL)
- {
- fclose(file);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
- Suite *suite = suite_create("utc_eina_xattr_fd_ls");
-
- TCase *tcase = tcase_create("TCase");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_xattr_fd_ls_p_1);
- suite_add_tcase(suite, tcase);
-
- return suite;
-}
-
-int
-main()
-{
- int number_failed;
-
- Suite *suite = test_suite();
- SRunner *srunner = srunner_create(suite);
- srunner_set_log(srunner, "utc_eina_xattr_fd_ls.log");
- srunner_set_xml(srunner, "utc_eina_xattr_fd_ls.xml");
- srunner_run_all(srunner, CK_NORMAL);
- number_failed = srunner_ntests_failed(srunner);
- srunner_free(srunner);
-
- return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_get eina_xattr_get()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- eina_init();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_get
- * @{
- * @objective Positive Test case 01: Get the extended attribute on a file.
- * @n Input Data:
- * @li file The file to retrieve the extended attribute from;
- * @li attribute The extended attribute name to retrieve;
- * @li size The size of the retrieved extended attribute.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create or replace the extended attribute of the file.
- * @step 3 Retrieve the extended attribute from the file.
- * @step 4 Compare returned data.
- *
- * @passcondition: The allocated data that hold the extended attribute value, there isn't segmentation fault.
- * @}
- */
-START_TEST(utc_eina_xattr_get_p_1)
-{
- FILE *file = NULL;
- file = fopen("eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
-
- const char* data = "data";
- ssize_t size = 0;
- Eina_Bool is_set = eina_xattr_set("eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT);
- const char* str = (const char*) eina_xattr_get("eina_file", "user.mime_type", &size);
-
- if (str == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- if ((is_set == EINA_FALSE) || (strcmp(data, str) != 0))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @addtogroup eina_xattr_get
- * @{
- * @objective Positive Test case 02: Get the extendet attribute on a file.
- * @n Input Data:
- * @li file The file to retrieve the extended attribute from;
- * @li attribute The extended attribute name to retrieve;
- * @li size The size of the retrieved extended attribute.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create or replace the extended attribute of the file.
- * @step 3 Replace the data of the previously existed extended attribute of the file.
- * @step 4 Retrieve the extended attribute from the file.
- * @step 5 Compare returned data.
- *
- * @passcondition: The allocated data that hold the extended attribute value, there isn't segmentation fault.
- * @}
- */
-START_TEST(utc_eina_xattr_get_p_2)
-{
- FILE * file = NULL;
- file = fopen("eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
-
- const char* data = "data";
- const char* new_data = "new_data";
- ssize_t size = 0;
-
- if (!eina_xattr_set("eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Bool is_set = eina_xattr_set("eina_file", "user.mime_type", (const void*) new_data, strlen(new_data) + sizeof(char), EINA_XATTR_REPLACE);
- const char* str = (const char*) eina_xattr_get("eina_file", "user.mime_type", &size);
-
- if (str == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- if ((is_set == EINA_FALSE) || (strcmp(new_data, str) != 0))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
- Suite *suite = suite_create("utc_eina_xattr_get");
-
- TCase *tcase = tcase_create("TCase");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_xattr_get_p_1);
- tcase_add_test(tcase, utc_eina_xattr_get_p_2);
- suite_add_tcase(suite, tcase);
-
- return suite;
-}
-
-int
-main()
-{
- int number_failed;
-
- Suite *suite = test_suite();
- SRunner *srunner = srunner_create(suite);
- srunner_set_log(srunner, "utc_eina_xattr_get.log");
- srunner_set_xml(srunner, "utc_eina_xattr_get.xml");
- srunner_run_all(srunner, CK_NORMAL);
- number_failed = srunner_ntests_failed(srunner);
- srunner_free(srunner);
-
- return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_int_get eina_xattr_int_get()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- eina_init();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_int_get
- * @{
- * @objective Positive Test case 01: Get a int from an extended attribute properties.
- * @n Input Data:
- * @li file The file to get the string from;
- * @li attribute The attribute to get;
- * @li value Where to put the extracted value.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create "user.mime_type" extended attribute of the file.
- * @step 3 Set the int for "user.comment" extended attribute properties of the file.
- * @step 4 Get the int from the "user.comment" extended attribute properties of the file.
- * @step 5 Compare set int with returned int.
- *
- * @passcondition: Test passes if EINA_TRUE is returned, gotten and set int are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_eina_xattr_int_get_p_1)
-{
- FILE * file = NULL;
- file = fopen("eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
-
- const char* data = "data";
- int value = 777;
-
- if (!eina_xattr_set("eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Bool is_set = EINA_FALSE;
- is_set = eina_xattr_int_set("eina_file", "user.comment", value, EINA_XATTR_INSERT);
-
- int returned_int;
- Eina_Bool is_get = eina_xattr_int_get("eina_file", "user.comment", &returned_int);
- if ((is_set == EINA_TRUE) && (returned_int == value) && (is_get == EINA_TRUE))
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
- }
-
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
- Suite *suite = suite_create("utc_eina_xattr_int_get");
-
- TCase *tcase = tcase_create("TCase");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_xattr_int_get_p_1);
- suite_add_tcase(suite, tcase);
-
- return suite;
-}
-
-int
-main()
-{
- int number_failed;
-
- Suite *suite = test_suite();
- SRunner *srunner = srunner_create(suite);
- srunner_set_log(srunner, "utc_eina_xattr_int_get.log");
- srunner_set_xml(srunner, "utc_eina_xattr_int_get.xml");
- srunner_run_all(srunner, CK_NORMAL);
- number_failed = srunner_ntests_failed(srunner);
- srunner_free(srunner);
-
- return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_int_set eina_xattr_int_set()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- eina_init();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_int_set
- * @{
- * @objective Positive Test case 01: Set an int as a extended attribute properties.
- * @n Input Data:
- * @li file The file to set the int to;
- * @li attribute The attribute to set;
- * @li value The int to set;
- * @li flags Define the set policy.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create "user.mime_type" extended attribute of the file.
- * @step 3 Set the int for "user.comment" extended attribute properties of the file.
- * @step 4 Get the int from the "user.comment" extended attribute properties of the file.
- * @step 5 Compare set int with returned int.
- *
- * @passcondition: Test passes if EINA_TRUE is returned, gotten and set int are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_eina_xattr_int_set_p_1)
-{
- FILE * file = NULL;
- file = fopen("eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
-
- const char* data = "data";
- int value = 777;
-
- if (!eina_xattr_set("eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Bool is_set = EINA_FALSE;
- is_set = eina_xattr_int_set("eina_file", "user.comment", value, EINA_XATTR_INSERT);
-
- int returned_int;
- Eina_Bool is_get = eina_xattr_int_get("eina_file", "user.comment", &returned_int);
- if ((is_set == EINA_TRUE) && (returned_int == value) && (is_get == EINA_TRUE))
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
- }
-
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
- Suite *suite = suite_create("utc_eina_xattr_int_set");
-
- TCase *tcase = tcase_create("TCase");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_xattr_int_set_p_1);
- suite_add_tcase(suite, tcase);
-
- return suite;
-}
-
-int
-main()
-{
- int number_failed;
-
- Suite *suite = test_suite();
- SRunner *srunner = srunner_create(suite);
- srunner_set_log(srunner, "utc_eina_xattr_int_set.log");
- srunner_set_xml(srunner, "utc_eina_xattr_int_set.xml");
- srunner_run_all(srunner, CK_NORMAL);
- number_failed = srunner_ntests_failed(srunner);
- srunner_free(srunner);
-
- return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_ls eina_xattr_ls()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- eina_init();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_ls
- * @{
- * @objective Positive Test case 01: Get an iterator that list all extended attribute of a file.
- * @n Input Data:
- * @li file The filename to retrieve the extended attribute list from.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create "user.mime_type" extended attribute of the file.
- * @step 3 Get an iterator.
- *
- * @passcondition: Test passes if iterator is not NULL and no segmentation fault.
- * @}
- */
-START_TEST(utc_eina_xattr_ls_p_1)
-{
- FILE * file = NULL;
- file = fopen("eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
-
- const char* data = "data";
-
- if (!eina_xattr_set("eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Iterator* it = eina_xattr_ls("eina_file");
- if (it != NULL)
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
- }
-
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
- Suite *suite = suite_create("utc_eina_xattr_ls");
-
- TCase *tcase = tcase_create("TCase");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_xattr_ls_p_1);
- suite_add_tcase(suite, tcase);
-
- return suite;
-}
-
-int
-main()
-{
- int number_failed;
-
- Suite *suite = test_suite();
- SRunner *srunner = srunner_create(suite);
- srunner_set_log(srunner, "utc_eina_xattr_ls.log");
- srunner_set_xml(srunner, "utc_eina_xattr_ls.xml");
- srunner_run_all(srunner, CK_NORMAL);
- number_failed = srunner_ntests_failed(srunner);
- srunner_free(srunner);
-
- return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_set eina_xattr_set()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- eina_init();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_set
- * @{
- * @objective Positive Test case 01: Set the extended attribute on a file.
- * @n Input Data:
- * @li name of the file to set the extended attribute to;
- * @li the attribute to set;
- * @li the data to set;
- * @li the length of the data to set;
- * @li EINA_XATTR_INSERT as the pararmeter that define the set policy.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create or replace the extended attribute of the file.
- * @step 3 Retrieve the extended attribute from the file.
- *
- * @passcondition: Test passes if EINA_TRUE is returned, returned and set strings are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_set_p_1)
-{
- FILE *file = NULL;
- file = fopen("eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- const char* data = "data";
- ssize_t size = 0;
- Eina_Bool is_set = eina_xattr_set("eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT);
- const char* str = (const char*) eina_xattr_get("eina_file", "user.mime_type", &size);
-
- if ((is_set == EINA_FALSE) || (str == NULL) || (strcmp(data, str) != 0))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @addtogroup eina_xattr_set
- * @{
- * @objective Positive Test case 02: Set the extended attribute on a file.
- * @n Input Data:
- * @li name of the file to set the extended attribute to;
- * @li the attribute to set;
- * @li the data to set;
- * @li the length of the data to set;
- * @li EINA_XATTR_REPLACE as the pararmeter that define the set policy.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create or replace the extended attribute of the file.
- * @step 3 Replace the data of the previously existed extended attribute of the file.
- * @step 4 Retrieve the extended attribute from the file.
- *
- * @passcondition: Test passes if EINA_TRUE is returned, returned and set strings are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_set_p_2)
-{
- FILE * file = NULL;
- file = fopen("eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- const char* data = "data";
- const char* new_data = "new_data";
- ssize_t size = 0;
-
- if (!eina_xattr_set("eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Bool is_set = eina_xattr_set("eina_file", "user.mime_type", (const void*) new_data, strlen(new_data) + sizeof(char), EINA_XATTR_REPLACE);
- const char* str = (const char*) eina_xattr_get("eina_file", "user.mime_type", &size);
-
- if ((is_set == EINA_FALSE) || (str == NULL) || (strcmp(new_data, str) != 0))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @addtogroup eina_xattr_set
- * @{
- * @objective Negative Test case 01: Set the extended attribute on NULL as the file.
- * @n Input Data:
- * @li NULL as the name of the file to set the extended attribute to;
- * @li the attribute to set;
- * @li the data to set;
- * @li the length of the data to set;
- * @li EINA_XATTR_INSERT as the pararmeter that define the set policy.
- *
- * @procedure
- * @step 1 Try to set the extended attribute on NULL as the file.
- *
- * @passcondition: Test passes if EINA_FALSE is returned and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_set_n_1)
-{
-
- const char* data = "data";
-
- if (eina_xattr_set(NULL, "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
- Suite *suite = suite_create("utc_eina_xattr_set");
-
- TCase *tcase = tcase_create("TCase");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_set_p_1);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_set_p_2);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_set_n_1);
- suite_add_tcase(suite, tcase);
-
- return suite;
-}
-
-int
-main()
-{
- int number_failed;
-
- Suite *suite = test_suite();
- SRunner *srunner = srunner_create(suite);
- srunner_set_log(srunner, "utc_eina_xattr_set.log");
- srunner_set_xml(srunner, "utc_eina_xattr_set.xml");
- srunner_run_all(srunner, CK_NORMAL);
- number_failed = srunner_ntests_failed(srunner);
- srunner_free(srunner);
-
- return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_string_get eina_xattr_string_get()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- eina_init();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_string_get
- * @{
- * @objective Positive Test case 01: Get a string from an extended attribute properties of the file.
- * @n Input Data:
- * @li name of the file to get the string from;
- * @li the attribute to get.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create "user.mime_type" extended attribute of the file.
- * @step 3 Set the string for "user.comment" extended attribute properties of the file.
- * @step 4 Get the string from the extended attribute properties of the file.
- * @step 5 Compare set string with returned string.
- *
- * @passcondition: Test passes if returned and set strings are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_string_get_p_1)
-{
- FILE * file = NULL;
- file = fopen("eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- const char* data = "data";
- const char* string = "string";
-
- if (!eina_xattr_set("eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- eina_xattr_string_set("eina_file", "user.comment", string, EINA_XATTR_INSERT);
-
- const char* returned_string = eina_xattr_string_get("eina_file", "user.comment");
- if ((returned_string != NULL) && (strcmp(returned_string, string) != 0))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @addtogroup eina_xattr_string_get
- * @{
- * @objective Negative Test case 01: Get the string from an extended attribute properties of NULL as the file.
- * @n Input Data:
- * @li NULL as the name of the file to get the string from;
- * @li the attribute to get.
- *
- * @procedure
- * @step 1 Try to get the string from an extended attribute properties of NULL as the file.
- *
- * @passcondition: Test passes if NULL is returned and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_string_get_n_1)
-{
-
- const char* data = NULL;
-
- data = eina_xattr_string_get(NULL, "user.comment");
-
- if (data != NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
- Suite *suite = suite_create("utc_eina_xattr_string_get");
-
- TCase *tcase = tcase_create("TCase");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_string_get_p_1);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_string_get_n_1);
- suite_add_tcase(suite, tcase);
-
- return suite;
-}
-
-int
-main()
-{
- int number_failed;
-
- Suite *suite = test_suite();
- SRunner *srunner = srunner_create(suite);
- srunner_set_log(srunner, "utc_eina_xattr_string_get.log");
- srunner_set_xml(srunner, "utc_eina_xattr_string_get.xml");
- srunner_run_all(srunner, CK_NORMAL);
- number_failed = srunner_ntests_failed(srunner);
- srunner_free(srunner);
-
- return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_string_set eina_xattr_string_set()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- eina_init();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_string_set
- * @{
- * @objective Positive Test case 01: Set a string as a extended attribute properties of the file.
- * @n Input Data:
- * @li name of the file to set the string to;
- * @li the attribute to set;
- * @li the NULL-terminated string to set;
- * @li EINA_XATTR_INSERT as the parameter that define the set policy.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create "user.mime_type" extended attribute of the file.
- * @step 3 Set the string for "user.comment" extended attribute properties of the file.
- * @step 4 Get the string from the "user.comment" extended attribute properties of the file.
- * @step 5 Compare set string with returned string.
- *
- * @passcondition: Test passes if EINA_TRUE is returned, gotten and set strings are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_string_set_p_1)
-{
- FILE * file = NULL;
- file = fopen("eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- const char* data = "data";
- const char* string = "string";
-
- if (!eina_xattr_set("eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Bool is_set = EINA_FALSE;
- is_set = eina_xattr_string_set("eina_file", "user.comment", string, EINA_XATTR_INSERT);
-
- const char* returned_string = eina_xattr_string_get("eina_file", "user.comment");
- if ((is_set == EINA_TRUE) && (strcmp(returned_string, string) != 0))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @addtogroup eina_xattr_string_set
- * @{
- * @objective Negative Test case 01: Get the string from an extended attribute properties of NULL as the file.
- * @n Input Data:
- * @li NULL as the name of the file to set the string to;
- * @li the attribute to set;
- * @li the NULL-terminated string to set;
- * @li EINA_XATTR_INSERT as the parameter that define the set policy.
- *
- * @procedure
- * @step 1 Try to set the string as an extended attribute properties of NULL as the file.
- *
- * @passcondition: Test passes if EINA_FALSE is returned and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_string_set_n_1)
-{
- const char* str = "string";
-
- if (eina_xattr_string_set(NULL, "user.comment", str, EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
- Suite *suite = suite_create("utc_eina_xattr_string_set");
-
- TCase *tcase = tcase_create("TCase");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_string_set_p_1);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_string_set_n_1);
- suite_add_tcase(suite, tcase);
-
- return suite;
-}
-
-int
-main()
-{
- int number_failed;
-
- Suite *suite = test_suite();
- SRunner *srunner = srunner_create(suite);
- srunner_set_log(srunner, "utc_eina_xattr_string_set.log");
- srunner_set_xml(srunner, "utc_eina_xattr_string_set.xml");
- srunner_run_all(srunner, CK_NORMAL);
- number_failed = srunner_ntests_failed(srunner);
- srunner_free(srunner);
-
- return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_value_fd_ls eina_xattr_value_fd_ls()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- eina_init();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_value_fd_ls
- * @{
- * @objective Positive Test case 01: Get an iterator that list all extended attributes of a file.
- * @n Input Data:
- * @li the file descriptor to retrieve the extended attribute list from.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Get the file descriptor.
- * @step 3 Create the extended attribute of the file.
- * @step 4 Get the iterator that list all extended attributes.
- *
- * @passcondition: Test passes if iterator is not NULL and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_value_fd_ls_p_1)
-{
- FILE * file = NULL;
- file = fopen("eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- int fd = fileno(file);
-
- const char* str = "data";
- eina_xattr_string_set("eina_file", "user.comment", str, EINA_XATTR_INSERT);
- eina_xattr_string_set("eina_file", "user.mime_type", str, EINA_XATTR_INSERT);
-
- Eina_Iterator* it = eina_xattr_value_fd_ls(fd);
-
- if (it == NULL)
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @addtogroup eina_xattr_value_fd_ls
- * @{
- * @objective Negative Test case 01: Get the iterator that list all extended attribute of the invalid file descriptor.
- * @n Input Data:
- * @li -1 as the file descriptor to retrieve the extended attribute list from.
- *
- * @procedure
- * @step 1 Try to get the iterator that list all extended attributes of the invalid file descriptor.
- *
- * @passcondition: Test passes if NULL is returned and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_value_fd_ls_n_1)
-{
- Eina_Iterator* it = eina_xattr_value_fd_ls(-1);
-
- if (it != NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
- Suite *suite = suite_create("utc_eina_xattr_value_fd_ls");
-
- TCase *tcase = tcase_create("TCase");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_value_fd_ls_p_1);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_value_fd_ls_n_1);
- suite_add_tcase(suite, tcase);
-
- return suite;
-}
-
-int
-main()
-{
- int number_failed;
-
- Suite *suite = test_suite();
- SRunner *srunner = srunner_create(suite);
- srunner_set_log(srunner, "utc_eina_xattr_value_fd_ls.log");
- srunner_set_xml(srunner, "utc_eina_xattr_value_fd_ls.xml");
- srunner_run_all(srunner, CK_NORMAL);
- number_failed = srunner_ntests_failed(srunner);
- srunner_free(srunner);
-
- return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_value_ls eina_xattr_value_ls()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- eina_init();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_value_ls
- * @{
- * @objective Positive Test case 01: Get an iterator that list all extended attribute of a file.
- * @n Input Data:
- * @li name of the file to retrieve the extended attribute list from.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create or replace the extended attribute of the file.
- * @step 3 Get the iterator.
- *
- * @passcondition: Test passes if returned iterator is not NULL and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_value_ls_p_1)
-{
- FILE * file = NULL;
- file = fopen("eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- const char* str = "data";
- eina_xattr_string_set("eina_file", "user.comment", str, EINA_XATTR_INSERT);
-
- Eina_Iterator* it = eina_xattr_value_ls("eina_file");
-
- if (it == NULL)
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @addtogroup eina_xattr_value_ls
- * @{
- * @objective Negative Test case 01: Get an iterator that list all extended attribute of NULL as the file.
- * @n Input Data:
- * @li NULL as the name of the file to retrieve the extended attribute list from.
- *
- * @procedure
- * @step 1 Try to get an iterator that list all extended attribute of NULL as the file.
- *
- * @passcondition: Test passes if NULL is returned and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_value_ls_n_1)
-{
- Eina_Iterator* it = eina_xattr_value_ls(NULL);
-
- if (it != NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
- Suite *suite = suite_create("utc_eina_xattr_value_ls");
-
- TCase *tcase = tcase_create("TCase");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_value_ls_p_1);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_value_ls_n_1);
- suite_add_tcase(suite, tcase);
-
- return suite;
-}
-
-int
-main()
-{
- int number_failed;
-
- Suite *suite = test_suite();
- SRunner *srunner = srunner_create(suite);
- srunner_set_log(srunner, "utc_eina_xattr_value_ls.log");
- srunner_set_xml(srunner, "utc_eina_xattr_value_ls.xml");
- srunner_run_all(srunner, CK_NORMAL);
- number_failed = srunner_ntests_failed(srunner);
- srunner_free(srunner);
-
- return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}