summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/test/test_pax_filename_encoding.c
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2009-03-07 03:41:29 +0000
committerkientzle <kientzle@FreeBSD.org>2009-03-07 03:41:29 +0000
commit71a038a8db403caefc8e2e7a5af61fb2dd3b332d (patch)
tree25680fd6a85728ffab9bf4e9764d7555dc596ab4 /lib/libarchive/test/test_pax_filename_encoding.c
parent4ea9b12e9212e2e7131488321b53fe1fdffc3082 (diff)
downloadFreeBSD-src-71a038a8db403caefc8e2e7a5af61fb2dd3b332d.zip
FreeBSD-src-71a038a8db403caefc8e2e7a5af61fb2dd3b332d.tar.gz
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().
Diffstat (limited to 'lib/libarchive/test/test_pax_filename_encoding.c')
-rw-r--r--lib/libarchive/test/test_pax_filename_encoding.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libarchive/test/test_pax_filename_encoding.c b/lib/libarchive/test/test_pax_filename_encoding.c
index 0106119..0983dff 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));
OpenPOWER on IntegriCloud