summary refs log tree commit diff
path: root/localedata/tst-trans.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-18 00:23:52 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-18 00:23:52 +0000
commit498b733ef0c21d5ecf9ef1dd284c48b2cecb7b0a (patch)
treea29c5a6acad6cd430cca56c33ce0d17e751ac3f9 /localedata/tst-trans.c
parentce723583fc8c5241879dfb5c1d7f940ded72f283 (diff)
downloadglibc-498b733ef0c21d5ecf9ef1dd284c48b2cecb7b0a.tar.gz
glibc-498b733ef0c21d5ecf9ef1dd284c48b2cecb7b0a.tar.xz
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/tst-trans.c')
-rw-r--r--localedata/tst-trans.c17
1 files changed, 17 insertions, 0 deletions
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;
 }