summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2017-03-28 22:11:15 +0200
committerandroid-build-merger <android-build-merger@google.com>2017-03-28 22:11:15 +0200
commit9166f66eee883d6d6cc280a6c355e5528bb4a3f0 (patch)
treebd93922ea314e16adf659b230581b572f624b5f0 /tests
parentMerge changes from topic 'sinkfn' am: 34df98ee6d am: 862b7e8523 (diff)
parentMerge "Add the missing sr-Latn into png files and rename the png locale header" am: 713d915636 (diff)
downloadandroid_bootable_recovery-9166f66eee883d6d6cc280a6c355e5528bb4a3f0.tar
android_bootable_recovery-9166f66eee883d6d6cc280a6c355e5528bb4a3f0.tar.gz
android_bootable_recovery-9166f66eee883d6d6cc280a6c355e5528bb4a3f0.tar.bz2
android_bootable_recovery-9166f66eee883d6d6cc280a6c355e5528bb4a3f0.tar.lz
android_bootable_recovery-9166f66eee883d6d6cc280a6c355e5528bb4a3f0.tar.xz
android_bootable_recovery-9166f66eee883d6d6cc280a6c355e5528bb4a3f0.tar.zst
android_bootable_recovery-9166f66eee883d6d6cc280a6c355e5528bb4a3f0.zip
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/locale_test.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/unit/locale_test.cpp b/tests/unit/locale_test.cpp
index f73235005..cdaba0e8b 100644
--- a/tests/unit/locale_test.cpp
+++ b/tests/unit/locale_test.cpp
@@ -19,14 +19,15 @@
#include "minui/minui.h"
TEST(LocaleTest, Misc) {
- EXPECT_TRUE(matches_locale("zh_CN", "zh_CN_#Hans"));
- EXPECT_TRUE(matches_locale("zh", "zh_CN_#Hans"));
- EXPECT_FALSE(matches_locale("zh_HK", "zh_CN_#Hans"));
- EXPECT_TRUE(matches_locale("en_GB", "en_GB"));
- EXPECT_TRUE(matches_locale("en", "en_GB"));
- EXPECT_FALSE(matches_locale("en_GB", "en"));
- EXPECT_FALSE(matches_locale("en_GB", "en_US"));
- EXPECT_FALSE(matches_locale("en_US", ""));
- // Empty locale prefix in the PNG file will match the input locale.
- EXPECT_TRUE(matches_locale("", "en_US"));
+ EXPECT_TRUE(matches_locale("zh-CN", "zh-Hans-CN"));
+ EXPECT_TRUE(matches_locale("zh", "zh-Hans-CN"));
+ EXPECT_FALSE(matches_locale("zh-HK", "zh-Hans-CN"));
+ EXPECT_TRUE(matches_locale("en-GB", "en-GB"));
+ EXPECT_TRUE(matches_locale("en", "en-GB"));
+ EXPECT_FALSE(matches_locale("en-GB", "en"));
+ EXPECT_FALSE(matches_locale("en-GB", "en-US"));
+ EXPECT_FALSE(matches_locale("en-US", ""));
+ // Empty locale prefix in the PNG file will match the input locale.
+ EXPECT_TRUE(matches_locale("", "en-US"));
+ EXPECT_TRUE(matches_locale("sr-Latn", "sr-Latn-BA"));
}