summaryrefslogtreecommitdiff
path: root/src/tests/eina/eina_test_file.c
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2017-02-13 14:20:17 +0100
committerStefan Schmidt <stefan@osg.samsung.com>2017-02-13 14:20:17 +0100
commit0daed02e8988f9669cd3da47724e82d6929b23b9 (patch)
tree3f81084adcacf8aa08be7f9018cd9b730a22d49f /src/tests/eina/eina_test_file.c
parentd853b0ba688254b5f4b0e47c233690f0116c8678 (diff)
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.
Diffstat (limited to '')
-rw-r--r--src/tests/eina/eina_test_file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tests/eina/eina_test_file.c b/src/tests/eina/eina_test_file.c
index dbdf075da7..f49f5b651a 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)
851 851
852 /*If file was not opened as 'eina'*/ 852 /*If file was not opened as 'eina'*/
853 fd = create_file_not_empty(tmpfile, &test_file_path, EINA_TRUE); 853 fd = create_file_not_empty(tmpfile, &test_file_path, EINA_TRUE);
854 fail_if(fd != 0);
854 fail_if(!eina_file_unlink(test_file_path)); 855 fail_if(!eina_file_unlink(test_file_path));
855 856
856 /*If file was opened as 'eina'*/ 857 /*If file was opened as 'eina'*/
857 fd = create_file_not_empty(tmpfile, &test_file_path, EINA_TRUE); 858 fd = create_file_not_empty(tmpfile, &test_file_path, EINA_TRUE);
859 fail_if(fd != 0);
858 fail_if(!eina_file_open(test_file_path, EINA_FALSE)); 860 fail_if(!eina_file_open(test_file_path, EINA_FALSE));
859 fail_if(!eina_file_unlink(test_file_path)); 861 fail_if(!eina_file_unlink(test_file_path));
860 862