Changeset 2162
- Timestamp:
- Jul 3, 2005, 2:39:06 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libctests/glibc/locale/tst-C-locale.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2161 r2162 36 36 const wchar_t *wstr; 37 37 int result = 0; 38 #ifdef HAVE_NEWLOCALE 38 39 locale_t loc; 40 #endif 39 41 40 42 /* ISO C stuff. */ … … 167 169 STRTEST (NOEXPR, "^[nN]"); 168 170 171 #ifdef HAVE_NL_LANGINFO_EXTENTIONS 169 172 /* Extensions. */ 170 173 WSTRTEST (_NL_WABDAY_1, L"Sun"); … … 228 231 STRTEST (NEGATIVE_SIGN, ""); 229 232 STRTEST (GROUPING, ""); 233 #endif /* HAVE_NL_LANGINFO_EXTENTIONS */ 230 234 231 235 STRTEST (YESSTR, ""); 232 236 STRTEST (NOSTR, ""); 233 237 238 239 #ifdef HAVE_NEWLOCALE 234 240 /* Test the new locale mechanisms. */ 235 241 loc = newlocale (LC_ALL_MASK, locname, NULL); … … 464 470 freelocale (loc); 465 471 } 472 #endif /* HAVE_NEWLOCALE */ 466 473 467 474 return result; … … 492 499 result |= run_test ("POSIX"); 493 500 501 /* Replace the locale, set it back to C and retry. */ 502 if ( setlocale (LC_ALL, "jp_JP") != NULL 503 || setlocale (LC_ALL, "jp") != NULL 504 || setlocale (LC_ALL, "de_DE") != NULL 505 || setlocale (LC_ALL, "no_NO") != NULL 506 || setlocale (LC_ALL, "en_US") != NULL 507 || setlocale (LC_ALL, "en") != NULL 508 ) 509 { 510 /* First use the name "C". */ 511 if (setlocale (LC_ALL, "C") == NULL) 512 { 513 puts ("cannot set C locale"); 514 result = 1; 515 } 516 else 517 result = run_test ("Retest C"); 518 519 /* Then the name "POSIX". */ 520 if (setlocale (LC_ALL, "POSIX") == NULL) 521 { 522 puts ("cannot set POSIX locale"); 523 result = 1; 524 } 525 else 526 result |= run_test ("Retest POSIX"); 527 } 528 else 529 puts ("Skipping last test since we fail to find a valid locale."); 530 494 531 return result; 495 532 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.