]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Skip testing character conversion failures on platforms
authorTim Kientzle <kientzle@gmail.com>
Wed, 31 Dec 2008 07:20:56 +0000 (02:20 -0500)
committerTim Kientzle <kientzle@gmail.com>
Wed, 31 Dec 2008 07:20:56 +0000 (02:20 -0500)
where the "C" locale never generates such failures.
(Cygwin apparently has an overly-permissive "C" locale;
wctomb() never fails.)

SVN-Revision: 348

libarchive/test/test_pax_filename_encoding.c

index 1ce943223e910a03ac0b6d5ae853b4ab07821de9..30717750d25abc7d1c68b56ff8f7fbbb4abf998c 100644 (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));