Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add missing test files.
  • Loading branch information
Ulrich Drepper committed Nov 18, 2009
1 parent 815d814 commit 3a00b16
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
14 changes: 14 additions & 0 deletions locale/tst-duplocale.c
@@ -0,0 +1,14 @@
#include <locale.h>
#include <stdio.h>

static int
do_test (void)
{
locale_t d = duplocale (LC_GLOBAL_LOCALE);
if (d != (locale_t) 0)
freelocale (d);
return 0;
}

#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
20 changes: 20 additions & 0 deletions locale/tst-locname.c
@@ -0,0 +1,20 @@
#include <langinfo.h>
#include <locale.h>
#include <stdio.h>
#include <string.h>

static int
do_test (void)
{
const char *s = nl_langinfo (_NL_LOCALE_NAME (LC_CTYPE));
if (s == NULL || strcmp (s, "C") != 0)
{
printf ("incorrect locale name returned: %s, expected \"C\"\n", s);
return 1;
}

return 0;
}

#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"

0 comments on commit 3a00b16

Please sign in to comment.