diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-03-28 15:50:07 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-04-17 16:12:41 -0300 |
commit | edae9c07c2b3449103a76ae77cc12732f604c248 (patch) | |
tree | 75628838e7e0adc9eb282331cabfe9c0b0a7b1d0 | |
parent | 033cbb8ef89a9aab92e0102d3d0186b810b18b59 (diff) | |
download | glibc-edae9c07c2b3449103a76ae77cc12732f604c248.zip glibc-edae9c07c2b3449103a76ae77cc12732f604c248.tar.gz glibc-edae9c07c2b3449103a76ae77cc12732f604c248.tar.bz2 |
localedata: Use hexadecimal character escape on tests
Instead of latin1 ones.
-rw-r--r-- | localedata/bug-iconv-trans.c | 2 | ||||
-rw-r--r-- | localedata/tests-mbwc/dat_mbrtowc.c | 12 | ||||
-rw-r--r-- | localedata/tests-mbwc/dat_mbsrtowcs.c | 12 | ||||
-rw-r--r-- | localedata/tests-mbwc/dat_strcoll.c | 13 | ||||
-rw-r--r-- | localedata/tests-mbwc/dat_swscanf.c | 2 | ||||
-rw-r--r-- | localedata/tests-mbwc/dat_wcrtomb.c | 4 | ||||
-rw-r--r-- | localedata/tests-mbwc/dat_wcsrtombs.c | 10 | ||||
-rw-r--r-- | localedata/tests-mbwc/dat_wcstombs.c | 10 | ||||
-rw-r--r-- | localedata/tests-mbwc/dat_wctomb.c | 4 | ||||
-rw-r--r-- | localedata/tst-xlocale1.c | 4 | ||||
-rw-r--r-- | localedata/tst-xlocale2.c | 2 |
11 files changed, 39 insertions, 36 deletions
diff --git a/localedata/bug-iconv-trans.c b/localedata/bug-iconv-trans.c index f1a0416..c4c0ab7 100644 --- a/localedata/bug-iconv-trans.c +++ b/localedata/bug-iconv-trans.c @@ -7,7 +7,7 @@ int main (void) { iconv_t cd; - const char str[] = "ÄäÖöÜüß"; + const char str[] = "\xc4\xe4\xd6\xf6\xdc\xfc\xdf"; const char expected[] = "AEaeOEoeUEuess"; char *inptr = (char *) str; size_t inlen = strlen (str) + 1; diff --git a/localedata/tests-mbwc/dat_mbrtowc.c b/localedata/tests-mbwc/dat_mbrtowc.c index b8eb3dd..0387045 100644 --- a/localedata/tests-mbwc/dat_mbrtowc.c +++ b/localedata/tests-mbwc/dat_mbrtowc.c @@ -23,9 +23,9 @@ TST_MBRTOWC tst_mbrtowc_loc [] = { { /*----------------- #01 -----------------*/ { { - { 1, 1, "ÄÖÜ", 1, 0, 0 }, - { 1, 1, "ÄÖÜ", 2, 0, 0 }, - { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 }, + { 1, 1, "\xc4\xd6\xdc", 1, 0, 0 }, + { 1, 1, "\xc4\xd6\xdc", 2, 0, 0 }, + { 1, 1, "\xc4\xd6\xdc", USE_MBCURMAX, 0, 0 }, } }, { @@ -39,9 +39,9 @@ TST_MBRTOWC tst_mbrtowc_loc [] = { { /*----------------- #02 -----------------*/ { { - { 1, 1, "ÄÖÜ", 1, 0, 0 }, - { 1, 1, "ÄÖÜ", 2, 0, 0 }, - { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 }, + { 1, 1, "\xc4\xd6\xdc", 1, 0, 0 }, + { 1, 1, "\xc4\xd6\xdc", 2, 0, 0 }, + { 1, 1, "\xc4\xd6\xdc", USE_MBCURMAX, 0, 0 }, } }, { diff --git a/localedata/tests-mbwc/dat_mbsrtowcs.c b/localedata/tests-mbwc/dat_mbsrtowcs.c index e1ee181..3604acc 100644 --- a/localedata/tests-mbwc/dat_mbsrtowcs.c +++ b/localedata/tests-mbwc/dat_mbsrtowcs.c @@ -15,9 +15,9 @@ TST_MBSRTOWCS tst_mbsrtowcs_loc [] = { { /*----------------- #01 -----------------*/ { { - { 1, "üäö", 4, 0,0 }, - { 1, "üäö", 3, 0,0 }, - { 1, "üäö", 2, 0,0 }, + { 1, "\xfc\xe4\xf6", 4, 0,0 }, + { 1, "\xfc\xe4\xf6", 3, 0,0 }, + { 1, "\xfc\xe4\xf6", 2, 0,0 }, } }, { @@ -31,9 +31,9 @@ TST_MBSRTOWCS tst_mbsrtowcs_loc [] = { { /*----------------- #02 -----------------*/ { { - { 1, "üäö", 4, 0,0 }, - { 1, "", 1, 0,0 }, - { 0, "üäö", 4, 0,0 }, + { 1, "\xfc\xe4\xf6", 4, 0,0 }, + { 1, "", 1, 0,0 }, + { 0, "\xfc\xe4\xf6", 4, 0,0 }, } }, { diff --git a/localedata/tests-mbwc/dat_strcoll.c b/localedata/tests-mbwc/dat_strcoll.c index b729ae9..fd14090 100644 --- a/localedata/tests-mbwc/dat_strcoll.c +++ b/localedata/tests-mbwc/dat_strcoll.c @@ -27,13 +27,16 @@ TST_STRCOLL tst_strcoll_loc [] = { { { Tstrcoll, TST_LOC_de }, { - { /*input.*/ { "ÄBCDEFG", "ÄBCDEFG" }, /* #1 */ + { /*input.*/ { "\xc4\x42\x43\x44\x45\x46\x47", + "\xc4\x42\x43\x44\x45\x46\x47" }, /* #1 */ /*expect*/ { 0,1,0, }, }, - { /*input.*/ { "XX Ä XX", "XX B XX" }, /* #2 */ + { /*input.*/ { "\x58\x58\x20\xc4\x20\x58\x58", + "XX B XX" }, /* #2 */ /*expect*/ { 0,0,-1, }, }, - { /*input.*/ { "XX B XX", "XX Ä XX" }, /* #3 */ + { /*input.*/ { "XX B XX", + "\x58\x58\x20\xc4\x20\x58\x58" }, /* #3 */ /*expect*/ { 0,0,+1, }, }, { /*input.*/ { "B", "a" }, /* #4 */ @@ -48,10 +51,10 @@ TST_STRCOLL tst_strcoll_loc [] = { { /*input.*/ { "A", "b" }, /* #7 */ /*expect*/ { 0,0,-1, }, }, - { /*input.*/ { "ä", "B" }, /* #8 */ + { /*input.*/ { "\xe4", "B" }, /* #8 */ /*expect*/ { 0,0,-1, }, }, - { /*input.*/ { "B", "ä" }, /* #9 */ + { /*input.*/ { "B", "\xe4" }, /* #9 */ /*expect*/ { 0,0,+1, }, }, { .is_last = 1 } /* Last element. */ diff --git a/localedata/tests-mbwc/dat_swscanf.c b/localedata/tests-mbwc/dat_swscanf.c index 7f65832..eb813f2 100644 --- a/localedata/tests-mbwc/dat_swscanf.c +++ b/localedata/tests-mbwc/dat_swscanf.c @@ -31,7 +31,7 @@ TST_SWSCANF tst_swscanf_loc [] = { /* The fields are: err_val, ret_flag, ret_val, val_int, val_uns, val_flt, val_c, val_s, val_S. */ 0,1,5, - -1, 2, 3.3, 'ä', "ÄÜ", { 0x0000, }, + -1, 2, 3.3, '\xe4', "\xc4\xdc", { 0x0000, }, }, }, /*------------------------ 02 -----------------------*/ diff --git a/localedata/tests-mbwc/dat_wcrtomb.c b/localedata/tests-mbwc/dat_wcrtomb.c index 8500f68..826e373 100644 --- a/localedata/tests-mbwc/dat_wcrtomb.c +++ b/localedata/tests-mbwc/dat_wcrtomb.c @@ -13,11 +13,11 @@ TST_WCRTOMB tst_wcrtomb_loc [] = { { /* #01 : normal case */ { /*input.*/ { 1, 0x00FC, 0,0 }, - /*expect*/ { 0, 1,1, "ü" }, + /*expect*/ { 0, 1,1, "\xfc" }, }, /* #02 : normal case */ { /*input.*/ { 1, 0x00D6, 0,0 }, - /*expect*/ { 0, 1,1, "Ö" }, + /*expect*/ { 0, 1,1, "\xd6" }, }, /* #03 : error case */ { /*input.*/ { 1, 0xFFA1, 0,0 }, diff --git a/localedata/tests-mbwc/dat_wcsrtombs.c b/localedata/tests-mbwc/dat_wcsrtombs.c index d3148b2..e98a533 100644 --- a/localedata/tests-mbwc/dat_wcsrtombs.c +++ b/localedata/tests-mbwc/dat_wcsrtombs.c @@ -26,26 +26,26 @@ TST_WCSRTOMBS tst_wcsrtombs_loc [] = { }, /* #02 : Only one chars should be stored in s. No null termination. */ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 1, 0, 0 }, - /*expect*/ { 0,1,1, "Ä" }, + /*expect*/ { 0,1,1, "\xc4" }, }, /* #03 : Only two chars should be stored in s. No null termination. */ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 2, 0, 0 }, - /*expect*/ { 0,1,2, "ÄÖ" }, + /*expect*/ { 0,1,2, "\xc4\xd6" }, }, /* #04 : Only three chars should be stored in s. No null termination. */ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 3, 0, 0 }, - /*expect*/ { 0,1,3, "ÄÖÜ" }, + /*expect*/ { 0,1,3, "\xc4\xd6\xdc" }, }, /* #05 : Only three chars should be stored in s with a null termination. */ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 4, 0, 0 }, - /*expect*/ { 0,1,3, "ÄÖÜ" }, + /*expect*/ { 0,1,3, "\xc4\xd6\xdc" }, }, /* #06 : Only three chars should be stored in s with a null termination. */ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 5, 0, 0 }, - /*expect*/ { 0,1,3, "ÄÖÜ" }, + /*expect*/ { 0,1,3, "\xc4\xd6\xdc" }, }, /* #07 : Invalid mb sequence. No chars should be stored in s. */ { /*input.*/ { 1,1, { 0x0201,0x0221,0x0000,0x0000 }, 2, 0, 0 }, diff --git a/localedata/tests-mbwc/dat_wcstombs.c b/localedata/tests-mbwc/dat_wcstombs.c index a6dd0ec..ad9f44f 100644 --- a/localedata/tests-mbwc/dat_wcstombs.c +++ b/localedata/tests-mbwc/dat_wcstombs.c @@ -25,26 +25,26 @@ TST_WCSTOMBS tst_wcstombs_loc [] = { }, /* #02 : Only one chars should be stored in s. No null termination. */ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 1 }, - /*expect*/ { 0,1,1, "Ä" }, + /*expect*/ { 0,1,1, "\xc4" }, }, /* #03 : Only two chars should be stored in s. No null termination. */ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 2 }, - /*expect*/ { 0,1,2, "ÄÖ" }, + /*expect*/ { 0,1,2, "\xc4\xd6" }, }, /* #04 : Only three chars should be stored in s. No null termination. */ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 3 }, - /*expect*/ { 0,1,3, "ÄÖÜ" }, + /*expect*/ { 0,1,3, "\xc4\xd6\xdc" }, }, /* #05 : Only three chars should be stored in s with a null termination. */ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 4 }, - /*expect*/ { 0,1,3, "ÄÖÜ" }, + /*expect*/ { 0,1,3, "\xc4\xd6\xdc" }, }, /* #06 : Only three chars should be stored in s with a null termination. */ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 5 }, - /*expect*/ { 0,1,3, "ÄÖÜ" }, + /*expect*/ { 0,1,3, "\xc4\xd6\xdc" }, }, /* #07 : Invalid mb sequence. No chars should be stored in s. */ { /*input.*/ { 1,1, { 0x0201,0x0221,0x0000,0x0000 }, 2 }, diff --git a/localedata/tests-mbwc/dat_wctomb.c b/localedata/tests-mbwc/dat_wctomb.c index 7394ca5..1b8227e 100644 --- a/localedata/tests-mbwc/dat_wctomb.c +++ b/localedata/tests-mbwc/dat_wctomb.c @@ -59,11 +59,11 @@ TST_WCTOMB tst_wctomb_loc [] = { { /* #01 : normal case */ { /*input.*/ { 1, 0x00C4 }, - /*expect*/ { 0,1,1, "Ä" }, + /*expect*/ { 0,1,1, "\xc4" }, }, /* #02 : normal case */ { /*input.*/ { 1, 0x00DC }, - /*expect*/ { 0,1,1, "Ü" }, + /*expect*/ { 0,1,1, "\xdc" }, }, /* #03 : normal case */ { /*input.*/ { 1, 0x0092 }, diff --git a/localedata/tst-xlocale1.c b/localedata/tst-xlocale1.c index 9f545a0..e6c5970 100644 --- a/localedata/tst-xlocale1.c +++ b/localedata/tst-xlocale1.c @@ -13,9 +13,9 @@ static struct { { "C", "TRANSLIT", "translit", 0 }, { "de_DE.ISO-8859-1", "TRANSLIT", "translit", 0 }, - { "de_DE.ISO-8859-1", "TRANSLIT", "trÄnslit", -1 }, + { "de_DE.ISO-8859-1", "TRANSLIT", "tr\xc4nslit", -1 }, { "de_DE.UTF-8", "TRANSLIT", "translit", 0 }, - { "de_DE.ISO-8859-1", "ä", "Ä", 1 } + { "de_DE.ISO-8859-1", "\xe4", "\xc4", 1 } }; #define ntests (sizeof (tests) / sizeof (tests[0])) diff --git a/localedata/tst-xlocale2.c b/localedata/tst-xlocale2.c index 7f99050..3387d7f 100644 --- a/localedata/tst-xlocale2.c +++ b/localedata/tst-xlocale2.c @@ -36,7 +36,7 @@ main (void) } -static const char str[] = "0123456789abcdef ABCDEF ghijklmnopqrstuvwxyzäÄöÖüÜ"; +static const char str[] = "0123456789abcdef ABCDEF ghijklmnopqrstuvwxyz\xe4\xc4\xf6\xd6\xfc\xdc"; static const char exd[] = "11111111110000000000000000000000000000000000000000"; static const char exa[] = "00000000001111110111111011111111111111111111111111"; static const char exx[] = "11111111111111110111111000000000000000000000000000"; |