diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-06-18 00:23:52 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-06-18 00:23:52 +0000 |
commit | 498b733ef0c21d5ecf9ef1dd284c48b2cecb7b0a (patch) | |
tree | a29c5a6acad6cd430cca56c33ce0d17e751ac3f9 /localedata | |
parent | ce723583fc8c5241879dfb5c1d7f940ded72f283 (diff) | |
download | glibc-498b733ef0c21d5ecf9ef1dd284c48b2cecb7b0a.tar glibc-498b733ef0c21d5ecf9ef1dd284c48b2cecb7b0a.tar.gz glibc-498b733ef0c21d5ecf9ef1dd284c48b2cecb7b0a.tar.bz2 glibc-498b733ef0c21d5ecf9ef1dd284c48b2cecb7b0a.zip |
Update.
* locale/programs/ld-ctype.c (ctype_output): Really write out
mboutdigits information.
* localedata/tst-trans.c: Add code to test printf's I flag with locale.
* localedata/tst-trans.sh: Set GCONV_PATH for compilation environment.
* localedata/tests/trans.def: Add outdigit information.
* localedata/tst-mbswcs3.c: Remove comment.
Diffstat (limited to 'localedata')
-rw-r--r-- | localedata/tests/trans.def | 3 | ||||
-rw-r--r-- | localedata/tst-mbswcs3.c | 19 | ||||
-rw-r--r-- | localedata/tst-trans.c | 17 | ||||
-rwxr-xr-x | localedata/tst-trans.sh | 4 |
4 files changed, 22 insertions, 21 deletions
diff --git a/localedata/tests/trans.def b/localedata/tests/trans.def index 2f2ac61b96..8bda88b7cb 100644 --- a/localedata/tests/trans.def +++ b/localedata/tests/trans.def @@ -110,6 +110,9 @@ toupper (<a>,<A>);/ charconv test test (<A>,<B>);(<B>,<C>) + +outdigit <a>;<b>;<c>;<d>;<e>;<f>;<g>;<h>;<i>;<j> + END LC_CTYPE LC_COLLATE diff --git a/localedata/tst-mbswcs3.c b/localedata/tst-mbswcs3.c index b9846ee8ac..a5929f85c4 100644 --- a/localedata/tst-mbswcs3.c +++ b/localedata/tst-mbswcs3.c @@ -74,22 +74,3 @@ main (void) return result; } - -/* Expected output: - -wcsrtombs(dst,&src,1,&state) -> 1, src = srcbuf+1, dst = buf+1 -wcsrtombs(dst,&src,1,&state) -> 1, src = srcbuf+2, dst = buf+2 -wcsrtombs(dst,&src,3,&state) -> 3, src = srcbuf+3, dst = buf+5 -wcsrtombs(dst,&src,1,&state) -> 1, src = srcbuf+3, dst = buf+6 - -*/ - -/* Output of a non-restarting implementation: - -wcsrtombs(dst,&src,1,&state) -> 1, src = srcbuf+1, dst = buf+1 -wcsrtombs(dst,&src,1,&state) -> 0, src = srcbuf+1, dst = buf+1 -wcsrtombs(dst,&src,3,&state) -> 3, src = srcbuf+2, dst = buf+4 -wcsrtombs(dst,&src,1,&state) -> 0, src = srcbuf+2, dst = buf+4 -wrong results - -*/ diff --git a/localedata/tst-trans.c b/localedata/tst-trans.c index 8bc64ce069..a84ee20e72 100644 --- a/localedata/tst-trans.c +++ b/localedata/tst-trans.c @@ -20,14 +20,18 @@ #include <locale.h> #include <stdio.h> +#include <wchar.h> #include <wctype.h> int main (void) { + char buf[30]; + wchar_t wbuf[30]; wctrans_t t; wint_t wch; int errors = 0; + int len; setlocale (LC_ALL, ""); @@ -48,5 +52,18 @@ main (void) if (wch != L'C') errors = 1; + /* Test the output digit handling. */ + swprintf (wbuf, sizeof (wbuf) / sizeof (wbuf[0]), L"%Id", 0x499602D2); + errors |= wcscmp (wbuf, L"bcdefghija") != 0; + len = wcslen (wbuf); + errors |= len != 10; + printf ("len = %d, wbuf = L\"%ls\"\n", len, wbuf); + + snprintf (buf, sizeof buf, "%Id", 0x499602D2); + errors |= strcmp (buf, "bcdefghija") != 0; + len = strlen (buf); + errors |= len != 10; + printf ("len = %d, buf = \"%s\"\n", len, buf); + return errors; } diff --git a/localedata/tst-trans.sh b/localedata/tst-trans.sh index c4fe934133..c17525dd18 100755 --- a/localedata/tst-trans.sh +++ b/localedata/tst-trans.sh @@ -29,8 +29,8 @@ ${common_objpfx}localedata/tt_TT || exit 1 # Run the test program. -LOCPATH=${common_objpfx}localedata LC_ALL=tt_TT \ -${common_objpfx}elf/ld.so --library-path $common_objpfx \ +LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ +LC_ALL=tt_TT ${common_objpfx}elf/ld.so --library-path $common_objpfx \ ${common_objpfx}localedata/tst-trans > ${common_objpfx}localedata/tst-trans.out exit $? |