This commit is contained in:
Afraz Siddiqui 2020-10-12 14:10:29 -04:00
Родитель d1402db9f6
Коммит 00ee809043
1 изменённых файлов: 29 добавлений и 0 удалений

Просмотреть файл

@ -30,6 +30,35 @@ final class LocalizedStringKitTests: XCTestCase {
}
}
func testLocalizedWithKeyExtension() {
guard Locale.current.languageCode == "en" else {
XCTFail("Please add other development language localization tests")
return
}
XCTAssertEqual(LocalizedWithKeyExtension("Open", "Open", "Open is a verb"), "Open")
XCTAssertEqual(
LocalizedWithKeyExtensionAndBundle(
"Open",
"Open",
"Open is a verb",
"informationn"
),
"Open"
)
}
func testLocalizedWithBundle() {
guard Locale.current.languageCode == "en" else {
XCTFail("Please add other development language localization tests")
return
}
XCTAssertEqual(LocalizedWithBundle("Open", "Open", "info"), "Open")
}
func testGetLocalizedStringKitBundle() {
XCTAssertNil(getLocalizedStringKitBundle("unknown_bundle"))
}
func testPrimaryBundleName() {
XCTAssertEqual(LSKPrimaryBundleName, "LocalizedStringKit.bundle")
LSKSetPrimaryBundleName("Other.bundle")