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().
This commit is contained in:
Tim Kientzle 2009-03-07 03:41:29 +00:00
parent 419eb469bc
commit 0d9e6eaf1a

View File

@ -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));