]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Skip a test for handling of invalid characters if the
authorTim Kientzle <kientzle@gmail.com>
Sun, 28 Dec 2008 23:54:08 +0000 (18:54 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sun, 28 Dec 2008 23:54:08 +0000 (18:54 -0500)
local platform's "C" locale has no invalid characters.
In particular, this fixes libarchive_test on Cygwin.

SVN-Revision: 294

libarchive/test/test_pax_filename_encoding.c

index 6bbd271758c760a80d78b9bfb3cb08e9cd502ef8..7f68b17fc5360588f8b3de4f334dce4ddf12b6ae 100644 (file)
@@ -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));