mirror of
https://github.com/xweiba/location-spoofer.git
synced 2026-09-27 00:51:55 +08:00
fix(i18n): 修复首选语言回退并准备 v1.0.8
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import XCTest
|
||||
@testable import PaopaoLocationSpoofer
|
||||
|
||||
final class AppLocalizationTests: XCTestCase {
|
||||
func testOnlyFirstPreferredLanguageSelectsTheAppLanguage() {
|
||||
XCTAssertEqual(AppLocalization.identifier(for: ["it-IT", "zh-Hans-CN"]), "en")
|
||||
XCTAssertEqual(AppLocalization.identifier(for: ["fr-FR", "zh-Hant-TW"]), "en")
|
||||
XCTAssertEqual(AppLocalization.identifier(for: ["zh-Hans-CN", "it-IT"]), "zh-Hans")
|
||||
XCTAssertEqual(AppLocalization.identifier(for: ["zh-Hant-TW", "en-US"]), "zh-Hant")
|
||||
XCTAssertEqual(AppLocalization.identifier(for: []), "en")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user