aboutsummaryrefslogtreecommitdiff
path: root/catgets/test-gencat.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-11-28 13:57:45 +0000
committerUlrich Drepper <drepper@redhat.com>2000-11-28 13:57:45 +0000
commit14d5391f9be3b8fc538fa31303c1c9ceac23cd1a (patch)
tree60901263cf3270a18c74622eaf2c30048ebce3a0 /catgets/test-gencat.c
parentee25ee65c50800db31d0fde1db70338e3c44d8a7 (diff)
downloadglibc-14d5391f9be3b8fc538fa31303c1c9ceac23cd1a.tar
glibc-14d5391f9be3b8fc538fa31303c1c9ceac23cd1a.tar.gz
glibc-14d5391f9be3b8fc538fa31303c1c9ceac23cd1a.tar.bz2
glibc-14d5391f9be3b8fc538fa31303c1c9ceac23cd1a.zip
Update.
2000-11-28 Ulrich Drepper <drepper@redhat.com> * catgets/gencat.c (normalize_line): Take extra parameter with escape character. Change callers. (open_conversion): Determine mapping of 0x5c as wchar_t value. * catgets/Makefile: Add rules to build and run test-gencat. * catgets/sample.SJIS: New file. * catgets/test-gencat.c: New file. * catgets/test-gencat.sh: New file. Report and test case by Shinya Hanataka <hanataka@abyss.rim.or.jp>.
Diffstat (limited to 'catgets/test-gencat.c')
-rw-r--r--catgets/test-gencat.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/catgets/test-gencat.c b/catgets/test-gencat.c
new file mode 100644
index 0000000000..fe5d0916b7
--- /dev/null
+++ b/catgets/test-gencat.c
@@ -0,0 +1,23 @@
+#include <locale.h>
+#include <nl_types.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+ nl_catd catalog;
+ setlocale (LC_ALL, "");
+
+ printf ("LC_MESSAGES = %s\n", setlocale (LC_MESSAGES, NULL));
+
+ catalog = catopen ("sample", NL_CAT_LOCALE);
+ printf ("%s\n", catgets(catalog, 1, 1, "sample 1"));
+ printf ("%s\n", catgets(catalog, 1, 2, "sample 2"));
+ printf ("%s\n", catgets(catalog, 1, 3, "sample 3"));
+ printf ("%s\n", catgets(catalog, 1, 4, "sample 4"));
+ printf ("%s\n", catgets(catalog, 1, 5, "sample 5"));
+ catclose (catalog);
+
+ return 0;
+}