Fix matches_locale function
matches_locale was expecting input locale string to have at most one underscore; as a result "zh_CN_#Hans" ignores "zh_CN" and matches into "zh". Fix the match function and add unit tests. Bug: 27837319 Change-Id: I4e8a66f91cae6ac2a46b6bf21f670d5ea564c7c8
This commit is contained in:
+5
-1
@@ -21,9 +21,13 @@ include $(CLEAR_VARS)
|
||||
LOCAL_CLANG := true
|
||||
LOCAL_MODULE := recovery_unit_test
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||
LOCAL_STATIC_LIBRARIES := libverifier
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libverifier \
|
||||
libminui
|
||||
|
||||
LOCAL_SRC_FILES := unit/asn1_decoder_test.cpp
|
||||
LOCAL_SRC_FILES += unit/recovery_test.cpp
|
||||
LOCAL_SRC_FILES += unit/locale_test.cpp
|
||||
LOCAL_C_INCLUDES := bootable/recovery
|
||||
LOCAL_SHARED_LIBRARIES := liblog
|
||||
include $(BUILD_NATIVE_TEST)
|
||||
|
||||
Reference in New Issue
Block a user