summaryrefslogtreecommitdiffstats
path: root/tests/unit/locale_test.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add the missing sr-Latn into png files and rename the png locale headerTianjie Xu2017-03-251-10/+11
| | | | | | | | | | | Switch the locale header in the png files from Locale.toString() to Locale.toLanguageTag(). For example, en_US --> en-us and sr__#Latn --> sr-Latn. Also clean up recovery a bit to expect the new locale format. Bug: 35215015 Test: sr-Latn shows correctly under graphic tests && recovery tests pass Change-Id: Ic62bab7756cdc6e5f98f26076f7c2dd046f811db
* Add checkers and tests for empty locale in PNG fileTianjie Xu2017-01-191-0/+3
| | | | | | | | | | | match_locale() will return false for empty locale string in the PNG file. Also add a manual test to validate if a PNG file is qualified to use under recovery. Bug: 34054052 Test: recovery_manual_test catches invalid PNG files successfully & Locale_test passed Change-Id: Id7e2136e1d8abf20da15825aa7901effbced8b03
* Fix matches_locale functionTianjie Xu2016-04-201-0/+29
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