Use Yavor's patch for tests

This commit is contained in:
Richard Frith-Macdonald 2018-02-16 07:03:34 +00:00
parent eb6e83e1bb
commit 908a712cdf
2 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2018-02-16 Yavor Doganov <yavor@gnu.org>
* Tests/base/NSNumberFormatter/basic10_4.m: Extend test expression
to fix test failure with ICU 60.2.
2018-02-11 Richard Frith-Macdonald <rfm@gnu.org>
* Tools/gdomap.c: Fix strncat length limits.

View file

@ -58,6 +58,7 @@ int main()
START_SET("NSLocale")
NSLocale *sys;
NSLocale *en;
unichar spc[1] = {0x00a0};
if (!NSLOCALE_SUPPORTED)
SKIP("NSLocale not supported\nThe ICU library was not available when GNUstep-base was built")
@ -156,12 +157,11 @@ int main()
"prefix and suffix used properly");
num = [[[NSNumber alloc] initWithFloat: -1234.56] autorelease];
/* Different versions of ICU use different formats, so we pick one.
*/
[fmt setNegativeFormat: @"-¤*0#,##0"];
str = [fmt stringFromNumber: num];
PASS_EQUAL(str, @"(R$1.235)", "negativeFormat used for -ve number");
PASS(([str isEqual: @"(R$1.235)"] || [str isEqual: @"_R$1.235"]
|| [str isEqual: [NSString stringWithFormat: @"_R$%s%@",
spc, @"1.235"]]),
"negativeFormat used for -ve number");
[fmt setNumberStyle: NSNumberFormatterNoStyle];
[fmt setMinusSign: @"_"];