Minor cleanup of the -q test: Assert that stdout/stderr are empty for each
extraction.
This commit is contained in:
parent
0b3866b2b4
commit
1168b06701
@ -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(".."));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user