diff options
Diffstat (limited to 'tests/tar_sparse_gnu.c')
-rw-r--r-- | tests/tar_sparse_gnu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/tar_sparse_gnu.c b/tests/tar_sparse_gnu.c index 216a54a..c1854a1 100644 --- a/tests/tar_sparse_gnu.c +++ b/tests/tar_sparse_gnu.c @@ -10,11 +10,12 @@ int main(void) { tar_header_decoded_t hdr; sparse_map_t *sparse; - FILE *fp; + istream_t *fp; TEST_ASSERT(chdir(TEST_PATH) == 0); - fp = test_open_read("sparse-files/gnu-small.tar"); + fp = istream_open_file("sparse-files/gnu-small.tar"); + TEST_NOT_NULL(fp); TEST_ASSERT(read_header(fp, &hdr) == 0); TEST_EQUAL_UI(hdr.sb.st_mode, S_IFREG | 0644); TEST_EQUAL_UI(hdr.sb.st_uid, 01750); @@ -43,6 +44,6 @@ int main(void) TEST_NULL(sparse->next); clear_header(&hdr); - fclose(fp); + sqfs_destroy(fp); return EXIT_SUCCESS; } |