Skip to content

Commit

Permalink
fixup! tests/pkg_fatfs_vfs: add test of fopen etc. with newlib
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-hm committed May 29, 2020
1 parent 1ba1133 commit 239f4d4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/pkg_fatfs_vfs/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,6 @@ static void test_newlib(void)
fclose(fl);
}

/* open file RO */
fl = fopen(FULL_FNAME1, "r");
print_test_result("test_newlib__fopen_r", fl != NULL);
print_test_result("test_newlib__fclose_r", fclose(fl) == 0);

/* create new file write and check content */
remove(FULL_FNAME2);
fl = fopen(FULL_FNAME2, "w+");
Expand All @@ -324,6 +319,13 @@ static void test_newlib(void)
fread(buf, sizeof(*buf), sizeof(buf), fl) > 0);
print_test_result("test_newlib__strcmp_w", strcmp(test_txt, buf) == 0);
print_test_result("test_newlib__fclose_w", fclose(fl) == 0);

/* open file RO */
fl = fopen(FULL_FNAME1, "r");
print_test_result("test_newlib__fopen_r", fl != NULL);
print_test_result("test_newlib__fclose_r", fclose(fl) == 0);

/* remove file */
print_test_result("test_newlib__remove", remove(FULL_FNAME2) == 0);

/* append to non existing file */
Expand Down

0 comments on commit 239f4d4

Please # to comment.