summaryrefslogtreecommitdiff
path: root/REORG.TODO/catgets/test-gencat.c
diff options
context:
space:
mode:
Diffstat (limited to 'REORG.TODO/catgets/test-gencat.c')
-rw-r--r--REORG.TODO/catgets/test-gencat.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/REORG.TODO/catgets/test-gencat.c b/REORG.TODO/catgets/test-gencat.c
new file mode 100644
index 0000000000..282974ca2f
--- /dev/null
+++ b/REORG.TODO/catgets/test-gencat.c
@@ -0,0 +1,34 @@
+#include <locale.h>
+#include <nl_types.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+static int
+do_test (void)
+{
+ nl_catd catalog;
+ setlocale (LC_ALL, "");
+
+ printf ("LC_MESSAGES = %s\n", setlocale (LC_MESSAGES, NULL));
+
+ catalog = catopen ("sample", NL_CAT_LOCALE);
+ if (catalog == (nl_catd) -1)
+ {
+ printf ("no catalog: %m\n");
+ exit (1);
+ }
+
+ 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"));
+ printf ("%s\n", catgets(catalog, 1, 6, "sample 6"));
+ printf ("%s\n", catgets(catalog, 1, 7, "sample 7"));
+ catclose (catalog);
+
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"