tests/lib: Add unit tests for ux_locales_get_text()

Add unit tests for ux_locales_get_text() in lib/ux_locales.c.

BUG=b:264666392, b:289995591
BRANCH=brya
TEST=make tests/lib/ux_locales-test
TEST=Make sure ux_locales.c has 100% test coverage

Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I4d73419c02478870942828d324c258ef0eaa983c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76253
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
diff --git a/tests/lib/Makefile.inc b/tests/lib/Makefile.inc
index 9a62476..3b8e93c 100644
--- a/tests/lib/Makefile.inc
+++ b/tests/lib/Makefile.inc
@@ -40,6 +40,7 @@
 tests-y += cbfs-lookup-no-mcache-test
 tests-y += cbfs-lookup-has-mcache-test
 tests-y += lzma-test
+tests-y += ux_locales-test
 
 lib-test-srcs += tests/lib/lib-test.c
 
@@ -241,3 +242,11 @@
 lzma-test-srcs += tests/stubs/console.c
 lzma-test-srcs += src/lib/lzma.c
 lzma-test-srcs += src/lib/lzmadecode.c
+
+ux_locales-test-srcs += tests/lib/ux_locales-test.c
+ux_locales-test-srcs += tests/stubs/console.c
+ux_locales-test-srcs += src/lib/ux_locales.c
+ux_locales-test-mocks += _cbfs_alloc \
+			cbfs_unmap \
+			vb2api_get_locale_id \
+			vboot_get_context