mirror of
https://gitee.com/openharmony/global_i18n
synced 2024-11-23 07:00:13 +00:00
多用户仅支持PC
Signed-off-by: WJ <wangjian546@huawei.com>
This commit is contained in:
parent
bb2c91099b
commit
870df4a428
@ -62,6 +62,9 @@ ohos_unittest("intl_test") {
|
||||
if (i18n_support_app_preferred_language) {
|
||||
defines = [ "SUPPORT_APP_PREFERRED_LANGUAGE" ]
|
||||
}
|
||||
if (target_platform == "pc") {
|
||||
defines += [ "SUPPORT_MULTI_USER" ]
|
||||
}
|
||||
|
||||
deps = [
|
||||
"//base/global/i18n/frameworks/intl:build_module",
|
||||
|
@ -1852,9 +1852,15 @@ HWTEST_F(IntlTest, IntlFuncTest00103, TestSize.Level1)
|
||||
std::string language = preferences->GetString("languageData", "");
|
||||
std::string locale = preferences->GetString("localeData", "");
|
||||
std::string is24Hour = preferences->GetString("is24HourData", "");
|
||||
#ifdef SUPPORT_MULTI_USER
|
||||
EXPECT_EQ(language, "101:zh-Hans");
|
||||
EXPECT_EQ(locale, "101:zh-Hans-CN");
|
||||
EXPECT_EQ(is24Hour, "101:false");
|
||||
#else
|
||||
EXPECT_EQ(language, "");
|
||||
EXPECT_EQ(locale, "");
|
||||
EXPECT_EQ(is24Hour, "");
|
||||
#endif
|
||||
}
|
||||
MultiUsers::RemoveUser("101");
|
||||
if (preferences != nullptr) {
|
||||
|
Loading…
Reference in New Issue
Block a user