From: Tim Kientzle Date: Sun, 28 Dec 2008 23:54:08 +0000 (-0500) Subject: Skip a test for handling of invalid characters if the X-Git-Tag: v2.7.0~544 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc19965e91c7def140d96f40dae492b80e744966;p=thirdparty%2Flibarchive.git Skip a test for handling of invalid characters if the local platform's "C" locale has no invalid characters. In particular, this fixes libarchive_test on Cygwin. SVN-Revision: 294 --- diff --git a/libarchive/test/test_pax_filename_encoding.c b/libarchive/test/test_pax_filename_encoding.c index 6bbd27175..7f68b17fc 100644 --- a/libarchive/test/test_pax_filename_encoding.c +++ b/libarchive/test/test_pax_filename_encoding.c @@ -210,6 +210,13 @@ DEFINE_TEST(test_pax_filename_encoding_3) return; } + /* If wctomb is broken, warn and return. */ + if (wctomb(buff, 0x1234) > 0) { + skipping("Cannot test conversion failures because \"C\" " + "locale on this system has no invalid characters."); + return; + } + assert((a = archive_write_new()) != NULL); assertEqualIntA(a, 0, archive_write_set_format_pax(a)); assertEqualIntA(a, 0, archive_write_set_compression_none(a));