From: Michihiro NAKAJIMA Date: Sun, 15 May 2011 14:39:47 +0000 (-0400) Subject: Use en_US.UTF-8 locale for tests instead of ru_RU.UTF-8 or ja_JP.UTF-8 X-Git-Tag: v3.0.0a~354 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=063c94fcaa89576808ddb90fbcb404b4e604ebc2;p=thirdparty%2Flibarchive.git Use en_US.UTF-8 locale for tests instead of ru_RU.UTF-8 or ja_JP.UTF-8 since some platform do not install those locales by default. SVN-Revision: 3333 --- diff --git a/libarchive/test/test_gnutar_filename_encoding.c b/libarchive/test/test_gnutar_filename_encoding.c index 0433f6749..12906867e 100644 --- a/libarchive/test/test_gnutar_filename_encoding.c +++ b/libarchive/test/test_gnutar_filename_encoding.c @@ -35,8 +35,8 @@ test_gnutar_filename_encoding_UTF8_CP866() char buff[4096]; size_t used; - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } diff --git a/libarchive/test/test_read_format_cab_filename.c b/libarchive/test/test_read_format_cab_filename.c index 3e5deb00d..54374deb9 100644 --- a/libarchive/test/test_read_format_cab_filename.c +++ b/libarchive/test/test_read_format_cab_filename.c @@ -87,10 +87,10 @@ test_read_format_cab_filename_CP932_UTF8(const char *refname) struct archive_entry *ae; /* - * Read CAB filename in ja_JP.UTF-8 with "hdrcharset=CP932" option. + * Read CAB filename in en_US.UTF-8 with "hdrcharset=CP932" option. */ - if (NULL == setlocale(LC_ALL, "ja_JP.UTF-8")) { - skipping("ja_JP.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } diff --git a/libarchive/test/test_read_format_cpio_filename.c b/libarchive/test/test_read_format_cpio_filename.c index 7803373b2..e347b5068 100644 --- a/libarchive/test/test_read_format_cpio_filename.c +++ b/libarchive/test/test_read_format_cpio_filename.c @@ -34,10 +34,10 @@ test_read_format_cpio_filename_eucJP_UTF8(const char *refname) struct archive_entry *ae; /* - * Read eucJP filename in ja_JP.UTF-8 with "hdrcharset=eucJP" option. + * Read eucJP filename in en_US.UTF-8 with "hdrcharset=eucJP" option. */ - if (NULL == setlocale(LC_ALL, "ja_JP.UTF-8")) { - skipping("ja_JP.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -135,10 +135,10 @@ test_read_format_cpio_filename_UTF8_UTF8_jp(const char *refname) struct archive_entry *ae; /* - * Read UTF-8 filename in ja_JP.UTF-8 without "hdrcharset=UTF-8" option. + * Read UTF-8 filename in en_US.UTF-8 without "hdrcharset=UTF-8" option. */ - if (NULL == setlocale(LC_ALL, "ja_JP.UTF-8")) { - skipping("ja_JP.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -233,10 +233,10 @@ test_read_format_cpio_filename_CP866_UTF8(const char *refname) struct archive_entry *ae; /* - * Read CP866 filename in ru_RU.UTF-8 with "hdrcharset=CP866" option. + * Read CP866 filename in en_US.UTF-8 with "hdrcharset=CP866" option. */ - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -336,10 +336,10 @@ test_read_format_cpio_filename_KOI8R_UTF8(const char *refname) struct archive_entry *ae; /* - * Read KOI8-R filename in ru_RU.UTF-8 with "hdrcharset=KOI8-R" option. + * Read KOI8-R filename in en_US.UTF-8 with "hdrcharset=KOI8-R" option. */ - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -491,10 +491,10 @@ test_read_format_cpio_filename_UTF8_UTF8_ru(const char *refname) struct archive_entry *ae; /* - * Read UTF-8 filename in ru_RU.UTF-8 without "hdrcharset=UTF-8" option. + * Read UTF-8 filename in en_US.UTF-8 without "hdrcharset=UTF-8" option. */ - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } diff --git a/libarchive/test/test_read_format_gtar_filename.c b/libarchive/test/test_read_format_gtar_filename.c index 5feb1e6eb..4b2a88c1e 100644 --- a/libarchive/test/test_read_format_gtar_filename.c +++ b/libarchive/test/test_read_format_gtar_filename.c @@ -34,10 +34,10 @@ test_read_format_gtar_filename_eucJP_UTF8(const char *refname) struct archive_entry *ae; /* - * Read eucJP filename in ja_JP.UTF-8 with "hdrcharset=eucJP" option. + * Read eucJP filename in en_US.UTF-8 with "hdrcharset=eucJP" option. */ - if (NULL == setlocale(LC_ALL, "ja_JP.UTF-8")) { - skipping("ja_JP.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -136,10 +136,10 @@ test_read_format_gtar_filename_CP866_UTF8(const char *refname) struct archive_entry *ae; /* - * Read CP866 filename in ru_RU.UTF-8 with "hdrcharset=CP866" option. + * Read CP866 filename in en_US.UTF-8 with "hdrcharset=CP866" option. */ - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -239,10 +239,10 @@ test_read_format_gtar_filename_KOI8R_UTF8(const char *refname) struct archive_entry *ae; /* - * Read KOI8-R filename in ru_RU.UTF-8 with "hdrcharset=KOI8-R" option. + * Read KOI8-R filename in en_US.UTF-8 with "hdrcharset=KOI8-R" option. */ - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } diff --git a/libarchive/test/test_read_format_lha_filename.c b/libarchive/test/test_read_format_lha_filename.c index 92f09a5d2..e39dfac41 100644 --- a/libarchive/test/test_read_format_lha_filename.c +++ b/libarchive/test/test_read_format_lha_filename.c @@ -94,10 +94,10 @@ test_read_format_lha_filename_CP932_UTF8(const char *refname) struct archive_entry *ae; /* - * Read LHA filename in ja_JP.UTF-8. + * Read LHA filename in en_US.UTF-8. */ - if (NULL == setlocale(LC_ALL, "ja_JP.UTF-8")) { - skipping("ja_JP.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } /* diff --git a/libarchive/test/test_read_format_tar_filename.c b/libarchive/test/test_read_format_tar_filename.c index b0b03c445..abec4ec6d 100644 --- a/libarchive/test/test_read_format_tar_filename.c +++ b/libarchive/test/test_read_format_tar_filename.c @@ -154,11 +154,11 @@ test_read_format_tar_filename_KOI8R_UTF8(const char *refname) struct archive_entry *ae; /* - * Read filename in ru_RU.UTF-8 with "hdrcharset=KOI8-R" option. + * Read filename in en_US.UTF-8 with "hdrcharset=KOI8-R" option. * We should correctly read two filenames. */ - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -200,7 +200,7 @@ test_read_format_tar_filename_KOI8R_UTF8(const char *refname) assertEqualInt(ARCHIVE_OK, archive_read_free(a)); /* - * Read filename in ru_RU.UTF-8 without "hdrcharset=KOI8-R" option. + * Read filename in en_US.UTF-8 without "hdrcharset=KOI8-R" option. * The filename we can properly read is only second file. */ diff --git a/libarchive/test/test_read_format_ustar_filename.c b/libarchive/test/test_read_format_ustar_filename.c index 59ccc8e61..f2e577d0a 100644 --- a/libarchive/test/test_read_format_ustar_filename.c +++ b/libarchive/test/test_read_format_ustar_filename.c @@ -34,10 +34,10 @@ test_read_format_ustar_filename_eucJP_UTF8(const char *refname) struct archive_entry *ae; /* - * Read eucJP filename in ja_JP.UTF-8 with "hdrcharset=eucJP" option. + * Read eucJP filename in en_US.UTF-8 with "hdrcharset=eucJP" option. */ - if (NULL == setlocale(LC_ALL, "ja_JP.UTF-8")) { - skipping("ja_JP.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -136,10 +136,10 @@ test_read_format_ustar_filename_CP866_UTF8(const char *refname) struct archive_entry *ae; /* - * Read CP866 filename in ru_RU.UTF-8 with "hdrcharset=CP866" option. + * Read CP866 filename in en_US.UTF-8 with "hdrcharset=CP866" option. */ - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -239,10 +239,10 @@ test_read_format_ustar_filename_KOI8R_UTF8(const char *refname) struct archive_entry *ae; /* - * Read KOI8-R filename in ru_RU.UTF-8 with "hdrcharset=KOI8-R" option. + * Read KOI8-R filename in en_US.UTF-8 with "hdrcharset=KOI8-R" option. */ - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } diff --git a/libarchive/test/test_read_format_zip_filename.c b/libarchive/test/test_read_format_zip_filename.c index 9d2c98981..e35fe2291 100644 --- a/libarchive/test/test_read_format_zip_filename.c +++ b/libarchive/test/test_read_format_zip_filename.c @@ -87,10 +87,10 @@ test_read_format_zip_filename_CP932_UTF8(const char *refname) struct archive_entry *ae; /* - * Read CP932 filename in ja_JP.UTF-8 with "hdrcharset=CP932" option. + * Read CP932 filename in en_US.UTF-8 with "hdrcharset=CP932" option. */ - if (NULL == setlocale(LC_ALL, "ja_JP.UTF-8")) { - skipping("ja_JP.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -227,12 +227,12 @@ test_read_format_zip_filename_UTF8_UTF8(const char *refname) struct archive_entry *ae; /* - * Read UTF-8 filename in ja_JP.UTF-8 without charset option + * Read UTF-8 filename in en_US.UTF-8 without charset option * because the file name in the sample file is UTF-8 and * Bit 11 of its general purpose bit flag is set. */ - if (NULL == setlocale(LC_ALL, "ja_JP.UTF-8")) { - skipping("ja_JP.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -337,10 +337,10 @@ test_read_format_zip_filename_CP866_UTF8(const char *refname) struct archive_entry *ae; /* - * Read CP866 filename in ru_RU.UTF-8 with "hdrcharset=CP866" option. + * Read CP866 filename in en_US.UTF-8 with "hdrcharset=CP866" option. */ - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -440,10 +440,10 @@ test_read_format_zip_filename_KOI8R_UTF8(const char *refname) struct archive_entry *ae; /* - * Read KOI8-R filename in ru_RU.UTF-8 with "hdrcharset=KOI8-R" option. + * Read KOI8-R filename in en_US.UTF-8 with "hdrcharset=KOI8-R" option. */ - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -608,12 +608,12 @@ test_read_format_zip_filename_UTF8_UTF8_ru(const char *refname) struct archive_entry *ae; /* - * Read UTF-8 filename in ru_RU.UTF-8 without charset option + * Read UTF-8 filename in en_US.UTF-8 without charset option * because the file name in the sample file is UTF-8 and * Bit 11 of its general purpose bit flag is set. */ - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -1003,10 +1003,10 @@ test_read_format_zip_filename_KOI8R_UTF8_2(const char *refname) struct archive_entry *ae; /* - * Read filename in ru_RU.UTF-8 with "hdrcharset=KOI8-R" option. + * Read filename in en_US.UTF-8 with "hdrcharset=KOI8-R" option. */ - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } @@ -1051,7 +1051,7 @@ next_test: assertEqualInt(ARCHIVE_OK, archive_read_free(a)); /* - * Read filename in ru_RU.UTF-8 without "hdrcharset=KOI8-R" option. + * Read filename in en_US.UTF-8 without "hdrcharset=KOI8-R" option. * The filename we can properly read is only second file. */ assert((a = archive_read_new()) != NULL); diff --git a/libarchive/test/test_ustar_filename_encoding.c b/libarchive/test/test_ustar_filename_encoding.c index dcc656686..1391e3697 100644 --- a/libarchive/test/test_ustar_filename_encoding.c +++ b/libarchive/test/test_ustar_filename_encoding.c @@ -35,8 +35,8 @@ test_ustar_filename_encoding_UTF8_CP866() char buff[4096]; size_t used; - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; } diff --git a/libarchive/test/test_zip_filename_encoding.c b/libarchive/test/test_zip_filename_encoding.c index 66d283332..30b42e59c 100644 --- a/libarchive/test/test_zip_filename_encoding.c +++ b/libarchive/test/test_zip_filename_encoding.c @@ -35,8 +35,8 @@ test_zip_filename_encoding_UTF8() char buff[4096]; size_t used; - if (NULL == setlocale(LC_ALL, "ru_RU.UTF-8")) { - skipping("ru_RU.UTF-8 locale not available on this system."); + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); return; }