From 7a724a7e550e6ad4434cb4973b55f4d3bbc3e329 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Thu, 23 Jul 2009 00:32:07 -0400 Subject: [PATCH] Fix the test naming. The cmake-based builds assume that we have exactly one official test case in each source file. If that's violated, the tests report wrong names for failed tests. SVN-Revision: 1267 --- libarchive/test/test_pax_filename_encoding.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libarchive/test/test_pax_filename_encoding.c b/libarchive/test/test_pax_filename_encoding.c index 1b445647c..1e67bf6a5 100644 --- a/libarchive/test/test_pax_filename_encoding.c +++ b/libarchive/test/test_pax_filename_encoding.c @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD: src/lib/libarchive/test/test_pax_filename_encoding.c,v 1.3 2 * 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 +84,7 @@ 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 +191,7 @@ 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 +325,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(); +} -- 2.47.3