From 1174e07975dcd4639dcde5c4424efb58bdb1ed16 Mon Sep 17 00:00:00 2001 From: kientzle Date: Tue, 3 Mar 2009 07:01:57 +0000 Subject: [PATCH] Merge r294 from libarchive.googlecode.com: Skip testing for locale-based failures on systems where the "C" locale is so permissive that it cannot possibly fail. In particular, this fixes a test problem on Cygwin. --- lib/libarchive/test/test_pax_filename_encoding.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/libarchive/test/test_pax_filename_encoding.c b/lib/libarchive/test/test_pax_filename_encoding.c index 649163471e20..217074d8fb26 100644 --- a/lib/libarchive/test/test_pax_filename_encoding.c +++ b/lib/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));