summaryrefslogtreecommitdiff
path: root/catgets/test-gencat.c
diff options
context:
space:
mode:
Diffstat (limited to 'catgets/test-gencat.c')
-rw-r--r--catgets/test-gencat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/catgets/test-gencat.c b/catgets/test-gencat.c
index fe5d0916b7..cb026fdc60 100644
--- a/catgets/test-gencat.c
+++ b/catgets/test-gencat.c
@@ -12,6 +12,12 @@ main (void)
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"));