From 5dc28c8b1d3075a623768b5fc4c018b489f372d9 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Fri, 17 Jul 2009 00:23:58 -0400 Subject: [PATCH] Bail early if the program under test doesn't support -q at all. SVN-Revision: 1230 --- tar/test/test_option_q.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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"); -- 2.47.3