summaryrefslogtreecommitdiff
path: root/cpio/test/test_option_y.c
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@gmail.com>2009-08-04 01:24:31 -0400
committerTim Kientzle <kientzle@gmail.com>2009-08-04 01:24:31 -0400
commitd65fdcd0f7d076126211f15ed23bf3675167ea74 (patch)
tree7ea74d972b0f7c2f9aeef18a4e0599e88429881e /cpio/test/test_option_y.c
parentb9795baa4e1f40b89e7e17f598673f9f7d78d437 (diff)
downloadlibarchive-d65fdcd0f7d076126211f15ed23bf3675167ea74.tar.gz
Convert most open()/read()/write()/close() to use assertMakeFile(), stdio, and slurpfile(), as appropriate.
SVN-Revision: 1337
Diffstat (limited to 'cpio/test/test_option_y.c')
-rw-r--r--cpio/test/test_option_y.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/cpio/test/test_option_y.c b/cpio/test/test_option_y.c
index a8a5936d..58734966 100644
--- a/cpio/test/test_option_y.c
+++ b/cpio/test/test_option_y.c
@@ -28,15 +28,11 @@ __FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_option_y.c,v 1.2 2008/08/24 06:21
DEFINE_TEST(test_option_y)
{
char *p;
- int fd;
int r;
size_t s;
/* Create a file. */
- fd = open("f", O_CREAT | O_WRONLY, 0644);
- assert(fd >= 0);
- assertEqualInt(1, write(fd, "a", 1));
- close(fd);
+ assertMakeFile("f", 0644, "a");
/* Archive it with bzip2 compression. */
r = systemf("echo f | %s -oy >archive.out 2>archive.err",