Fixed a long standing NSNumberFormatter bug in conjunction with zero padding

and (old) NSNumberFormatterBehavior10_0


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39245 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcus Müller 2015-12-30 21:09:55 +00:00
parent 2b6f8a27f9
commit 2bef5cf85d
3 changed files with 20 additions and 5 deletions

View file

@ -49,6 +49,11 @@ int main()
PASS_EQUAL([fmt stringForObjectValue: num], @" 001234",
"numeric and space padding OK")
[fmt setFormat: @"000"];
num = [[[NSNumber alloc] initWithInt: 10] autorelease];
PASS_EQUAL([fmt stringForObjectValue: num], @"010",
"numeric padding OK")
[fmt setAllowsFloats: YES];
num = [[[NSNumber alloc] initWithFloat: 1234.56] autorelease];