tests: Check return value in tests.

GCC was complaining about ignored return values from realpath, chdir,
etc.
This commit is contained in:
Lauro Moura 2018-01-22 19:58:29 -03:00
parent 9b56d9a257
commit 3a6ff3c6b3
3 changed files with 4 additions and 4 deletions

View File

@ -334,7 +334,7 @@ START_TEST(ecore_test_ecore_file_operations)
fail_if(ecore_file_cp(not_exist_file, "test_file") != EINA_FALSE);
fail_if(ecore_file_mv(not_exist_file, "test_file") != EINA_FALSE);
chdir(eina_environment_tmp_get());
ck_assert_int_eq(chdir(eina_environment_tmp_get()), 0);
fail_if(ecore_file_mkpath(src_dir) != EINA_TRUE);
fail_if(ecore_file_rmdir(src_dir) != EINA_TRUE);
fail_if(ecore_file_mkpath(NULL) != EINA_FALSE);

View File

@ -19,7 +19,7 @@ START_TEST (elm_code_file_load)
elm_init(1, NULL);
code = elm_code_create();
file = elm_code_file_open(code, path);
realpath(path, real);
ck_assert_ptr_ne(realpath(path, real), NULL);
ck_assert_str_eq(ecore_file_file_get(path), elm_code_file_filename_get(file));
ck_assert_str_eq(real, elm_code_file_path_get(file));

View File

@ -33,8 +33,8 @@ START_TEST (elm_code_open_test)
code = elm_code_create();
elm_code_file_open(code, path);
realpath(path, realpath1);
realpath(elm_code_file_path_get(code->file), realpath2);
ck_assert_ptr_ne(realpath(path, realpath1), NULL);
ck_assert_ptr_ne(realpath(elm_code_file_path_get(code->file), realpath2), NULL);
ck_assert(!!code);
ck_assert_str_eq(realpath1, realpath2);
elm_code_free(code);