summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tar')
-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