mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Check that we have the locale 'en'
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39675 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0d0b2b4503
commit
fb2b7d1d33
1 changed files with 5 additions and 1 deletions
|
@ -57,6 +57,7 @@ int main()
|
|||
|
||||
START_SET("NSLocale")
|
||||
NSLocale *sys;
|
||||
NSLocale *en;
|
||||
if (!NSLOCALE_SUPPORTED)
|
||||
SKIP("NSLocale not supported\nThe ICU library was not available when GNUstep-base was built")
|
||||
|
||||
|
@ -78,7 +79,10 @@ int main()
|
|||
str = [fmt stringFromNumber: num];
|
||||
PASS_EQUAL(str, @"1235", "default 10.4 format same as Cocoa")
|
||||
|
||||
[fmt setLocale: [[NSLocale alloc] initWithLocaleIdentifier: @"en"]];
|
||||
en = [[[NSLocale alloc] initWithLocaleIdentifier: @"en"] autorelease];
|
||||
PASS_EQUAL([en localeIdentifier], @"en", "have locale 'en'");
|
||||
|
||||
[fmt setLocale: en];
|
||||
|
||||
[fmt setMaximumFractionDigits: 2];
|
||||
str = [fmt stringFromNumber: num];
|
||||
|
|
Loading…
Reference in a new issue