mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Add test for zh-Hans_CN
This commit is contained in:
parent
c4730de6bd
commit
d971813d2a
1 changed files with 13 additions and 2 deletions
|
@ -102,7 +102,7 @@ int main(void)
|
|||
|
||||
locale = [[NSLocale alloc] initWithLocaleIdentifier: @"zh-Hant_TW"];
|
||||
PASS_EQUAL([locale objectForKey: NSLocaleCountryCode], @"TW",
|
||||
"zh-Hant_TW country code is zh");
|
||||
"zh-Hant_TW country code is TW");
|
||||
PASS_EQUAL([locale objectForKey: NSLocaleLanguageCode], @"zh",
|
||||
"zh-Hant_TW language code is zh");
|
||||
PASS_EQUAL([locale localeIdentifier], @"zh_TW",
|
||||
|
@ -110,7 +110,18 @@ int main(void)
|
|||
PASS_EQUAL([locale objectForKey: NSLocaleScriptCode], nil,
|
||||
"zh-Hant_TW has no script code");
|
||||
RELEASE(locale);
|
||||
|
||||
|
||||
locale = [[NSLocale alloc] initWithLocaleIdentifier: @"zh-Hans_CN"];
|
||||
PASS_EQUAL([locale objectForKey: NSLocaleCountryCode], @"CN",
|
||||
"zh-Hans_CN country code is CN");
|
||||
PASS_EQUAL([locale objectForKey: NSLocaleLanguageCode], @"zh",
|
||||
"zh-Hans_CN language code is zh");
|
||||
PASS_EQUAL([locale localeIdentifier], @"zh_CN",
|
||||
"'zh-Hans_CN' is stored as 'zh_CN'");
|
||||
PASS_EQUAL([locale objectForKey: NSLocaleScriptCode], nil,
|
||||
"zh-Hans_CN has no script code");
|
||||
RELEASE(locale);
|
||||
|
||||
PASS_EQUAL([NSLocale canonicalLocaleIdentifierFromString: nil], nil,
|
||||
"Canonical identifier for nil is nil");
|
||||
PASS_EQUAL([NSLocale canonicalLocaleIdentifierFromString: @""], @"",
|
||||
|
|
Loading…
Reference in a new issue