Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |