From 0d9e6eaf1a88ee6da9352e44edaf6d3fffbfb002 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sat, 7 Mar 2009 03:41:29 +0000 Subject: [PATCH] Merge r348 from libarchive.googlecode.com: Suppress testing invalid conversions if there aren't any. In particular, Cygwin's "C" locale has no invalid inputs for wctomb(). --- 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 01061199e63..0983dff7d12 100644 --- a/lib/libarchive/test/test_pax_filename_encoding.c +++ b/lib/libarchive/test/test_pax_filename_encoding.c @@ -217,6 +217,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));