stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0daed02e8988f9669cd3da47724e82d6929b23b9

commit 0daed02e8988f9669cd3da47724e82d6929b23b9
Author: Stefan Schmidt <[email protected]>
Date:   Mon Feb 13 14:20:17 2017 +0100

    tests: eina_file: check if the fd is really 0 when we set close file to true
    
    The return value from create_file_not_empty was saved but never checked if 
it
    really is 0. Whcih should be the case if we call the function with 
file_close
    true.
---
 src/tests/eina/eina_test_file.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/tests/eina/eina_test_file.c b/src/tests/eina/eina_test_file.c
index dbdf075..f49f5b6 100644
--- a/src/tests/eina/eina_test_file.c
+++ b/src/tests/eina/eina_test_file.c
@@ -851,10 +851,12 @@ START_TEST(eina_test_file_unlink)
 
    /*If file was not opened as 'eina'*/
    fd = create_file_not_empty(tmpfile, &test_file_path, EINA_TRUE);
+   fail_if(fd != 0);
    fail_if(!eina_file_unlink(test_file_path));
 
    /*If file was opened as 'eina'*/
    fd = create_file_not_empty(tmpfile, &test_file_path, EINA_TRUE);
+   fail_if(fd != 0);
    fail_if(!eina_file_open(test_file_path, EINA_FALSE));
    fail_if(!eina_file_unlink(test_file_path));
 

-- 


Reply via email to