From: Tim Kientzle Date: Fri, 17 Jul 2009 04:23:58 +0000 (-0400) Subject: Bail early if the program under test doesn't support -q at all. X-Git-Tag: v2.8.0~531 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dc28c8b1d3075a623768b5fc4c018b489f372d9;p=thirdparty%2Flibarchive.git Bail early if the program under test doesn't support -q at all. SVN-Revision: 1230 --- diff --git a/tar/test/test_option_q.c b/tar/test/test_option_q.c index b0979eb44..6f576fb81 100644 --- a/tar/test/test_option_q.c +++ b/tar/test/test_option_q.c @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD: src/usr.bin/tar/test/test_option_q.c,v 1.3 2008/08/22 01:35: DEFINE_TEST(test_option_q) { FILE *f; + int r; /* * Create an archive with several different versions of the @@ -82,9 +83,12 @@ DEFINE_TEST(test_option_q) /* Test 1: -q foo should only extract the first foo. */ assertEqualInt(0, mkdir("test1", 0755)); assertEqualInt(0, chdir("test1")); - assertEqualInt(0, - systemf("%s -xf ../archive.tar -q foo >test.out 2>test.err", - testprog)); + r = systemf("%s -xf ../archive.tar -q foo >test.out 2>test.err", + testprog); + failure("Fatal error trying to use -q option"); + if (!assertEqualInt(0, r)) + return; + assertFileContents("foo1", 4, "foo"); assertEmptyFile("test.out"); assertEmptyFile("test.err");