aboutsummaryrefslogtreecommitdiff
path: root/lib/libarchive
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2009-04-27 19:20:25 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2009-04-27 19:20:25 +0000
commit0cf3aa1afe711c6a9c366ed3f8a57d21be4f3da1 (patch)
treefbba74616eabfa2980dfa91cf6de97fe05f02d11 /lib/libarchive
parent3da657c177edea76304fc38d5b56a717bc93a787 (diff)
downloadsrc-0cf3aa1afe711c6a9c366ed3f8a57d21be4f3da1.tar.gz
src-0cf3aa1afe711c6a9c366ed3f8a57d21be4f3da1.zip
Merge r1058 from libarchive.googlecode.com: Require that each
test source file has exactly one DEFINE_TEST().
Notes
Notes: svn path=/head/; revision=191590
Diffstat (limited to 'lib/libarchive')
-rw-r--r--lib/libarchive/test/test_pax_filename_encoding.c16
-rw-r--r--lib/libarchive/test/test_read_format_isojoliet_bz2.c4
2 files changed, 13 insertions, 7 deletions
diff --git a/lib/libarchive/test/test_pax_filename_encoding.c b/lib/libarchive/test/test_pax_filename_encoding.c
index f882b2868972..45f984839caf 100644
--- a/lib/libarchive/test/test_pax_filename_encoding.c
+++ b/lib/libarchive/test/test_pax_filename_encoding.c
@@ -40,7 +40,8 @@ __FBSDID("$FreeBSD$");
* the right filename returned and that we get a warning only
* if the header isn't marked as binary.
*/
-DEFINE_TEST(test_pax_filename_encoding_1)
+static void
+test_pax_filename_encoding_1(void)
{
static const char testname[] = "test_pax_filename_encoding.tar";
/*
@@ -84,7 +85,8 @@ DEFINE_TEST(test_pax_filename_encoding_1)
* This should work; the underlying implementation should automatically
* fall back to storing the pathname in binary.
*/
-DEFINE_TEST(test_pax_filename_encoding_2)
+static void
+test_pax_filename_encoding_2(void)
{
char filename[] = "abc\314\214mno\374xyz";
struct archive *a;
@@ -191,7 +193,8 @@ DEFINE_TEST(test_pax_filename_encoding_2)
* read it back into "C" locale, which doesn't support the name.
* TODO: Figure out the "right" behavior here.
*/
-DEFINE_TEST(test_pax_filename_encoding_3)
+static void
+test_pax_filename_encoding_3(void)
{
wchar_t badname[] = L"xxxAyyyBzzz";
const char badname_utf8[] = "xxx\xE1\x88\xB4yyy\xE5\x99\xB8zzz";
@@ -325,3 +328,10 @@ DEFINE_TEST(test_pax_filename_encoding_3)
assertEqualInt(0, archive_read_finish(a));
#endif
}
+
+DEFINE_TEST(test_pax_filename_encoding)
+{
+ test_pax_filename_encoding_1();
+ test_pax_filename_encoding_2();
+ test_pax_filename_encoding_3();
+}
diff --git a/lib/libarchive/test/test_read_format_isojoliet_bz2.c b/lib/libarchive/test/test_read_format_isojoliet_bz2.c
index 19754b71c5f7..7b11bbbfceec 100644
--- a/lib/libarchive/test/test_read_format_isojoliet_bz2.c
+++ b/lib/libarchive/test/test_read_format_isojoliet_bz2.c
@@ -177,11 +177,7 @@ joliettest(int withrr)
DEFINE_TEST(test_read_format_isojoliet_bz2)
{
joliettest(0);
-}
-
-DEFINE_TEST(test_read_format_isojolietrr_bz2)
-{
/* XXXX This doesn't work today; can it be made to work? */
#if 0
joliettest(1);