]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Simplify by using assertMakeFile()
authorTim Kientzle <kientzle@gmail.com>
Sat, 10 Apr 2010 20:42:21 +0000 (16:42 -0400)
committerTim Kientzle <kientzle@gmail.com>
Sat, 10 Apr 2010 20:42:21 +0000 (16:42 -0400)
SVN-Revision: 2220

tar/test/test_option_exclude.c

index ab3bedded72e264d80b94f9cd320b7a6675ff11d..47a759f5bd3c6fe8a3f2a49e9326e27789a15a39 100644 (file)
@@ -27,19 +27,10 @@ __FBSDID("$FreeBSD$");
 
 DEFINE_TEST(test_option_exclude)
 {
-       FILE *f;
        int r;
 
-       f = fopen("file1", "w");
-       assert(f != NULL);
-       fprintf(f, "file1");
-       fclose(f);
-
-       f = fopen("file2", "w");
-       assert(f != NULL);
-       fprintf(f, "file2");
-       fclose(f);
-
+       assertMakeFile("file1", 0644, "file1");
+       assertMakeFile("file2", 0644, "file2");
        assertEqualInt(0, systemf("%s -cf archive.tar file1 file2", testprog));
 
        /*