summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2008-08-22 01:35:08 +0000
committerkientzle <kientzle@FreeBSD.org>2008-08-22 01:35:08 +0000
commit1168b06701c6ce7b123a2ee833738c2d381366fa (patch)
tree3c2c8596789437d0a043be1a37d2a3c58fdd47f5 /usr.bin
parent0b3866b2b494f1d94b961088dce1308b3c6e1b99 (diff)
downloadFreeBSD-src-1168b06701c6ce7b123a2ee833738c2d381366fa.zip
FreeBSD-src-1168b06701c6ce7b123a2ee833738c2d381366fa.tar.gz
Minor cleanup of the -q test: Assert that stdout/stderr are empty for each
extraction.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tar/test/test_option_q.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/tar/test/test_option_q.c b/usr.bin/tar/test/test_option_q.c
index d165119..1d92dd5 100644
--- a/usr.bin/tar/test/test_option_q.c
+++ b/usr.bin/tar/test/test_option_q.c
@@ -94,26 +94,32 @@ DEFINE_TEST(test_option_q)
assertEqualInt(0, mkdir("test2", 0755));
assertEqualInt(0, chdir("test2"));
assertEqualInt(0,
- systemf("%s -xf ../archive.tar -q foo bar", testprog));
+ systemf("%s -xf ../archive.tar -q foo bar >test.out 2>test.err", testprog));
assertFileContents("foo2", 4, "foo");
assertFileContents("bar1", 4, "bar");
+ assertEmptyFile("test.out");
+ assertEmptyFile("test.err");
assertEqualInt(0, chdir(".."));
/* Test 3: Same as test 2, but use --fast-read spelling. */
assertEqualInt(0, mkdir("test3", 0755));
assertEqualInt(0, chdir("test3"));
assertEqualInt(0,
- systemf("%s -xf ../archive.tar --fast-read foo bar", testprog));
+ systemf("%s -xf ../archive.tar --fast-read foo bar >test.out 2>test.err", testprog));
assertFileContents("foo2", 4, "foo");
assertFileContents("bar1", 4, "bar");
+ assertEmptyFile("test.out");
+ assertEmptyFile("test.err");
assertEqualInt(0, chdir(".."));
/* Test 4: Without -q, should extract everything. */
assertEqualInt(0, mkdir("test4", 0755));
assertEqualInt(0, chdir("test4"));
assertEqualInt(0,
- systemf("%s -xf ../archive.tar foo bar", testprog));
+ systemf("%s -xf ../archive.tar foo bar >test.out 2>test.err", testprog));
assertFileContents("foo3", 4, "foo");
assertFileContents("bar2", 4, "bar");
+ assertEmptyFile("test.out");
+ assertEmptyFile("test.err");
assertEqualInt(0, chdir(".."));
}
OpenPOWER on IntegriCloud