Skip to content

Commit 105fdaf

Browse files
committed
test_url: check return value of ftell
1 parent 904af62 commit 105fdaf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_url.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ test_copy_config_into_file(void **state)
241241
/* Get file size */
242242
fseek(file, 0, SEEK_END);
243243
size = ftell(file);
244+
assert_true(size > 0);
244245
rewind(file);
245246

246247
/* Allcate buffer */
@@ -332,6 +333,7 @@ test_copy_config_url2url(void **state)
332333
/* Get file size */
333334
fseek(file, 0, SEEK_END);
334335
size = ftell(file);
336+
assert_true(size > 0);
335337
rewind(file);
336338

337339
/* Allcate buffer */

0 commit comments

Comments
 (0)