Unit Test - Custom Region / Language not respected
Originator: | simon | ||
Number: | rdar://47436994 | Date Originated: | 2019-01-22 |
Status: | Open | Resolved: | |
Product: | Developer Tools | Product Version: | Version 10.1 (10B61) |
Classification: | Bug | Reproducible: | Always |
Summary: Xcode schemes provide the ability to set an Application Region and Language to use when executing unit tests. These custom regions and languages worked perfectly fine in Xcode 9, but are ignored within Xcode 10. Steps to Reproduce: 1/ Create CocoaTouch Framework Target with unit tests. 2/ Create a unit test with `XCTAssertEqual(Locale.current.identifier, "fr_IT")` 3/ Open the Scheme Editor. Click Test 4/ Within the Options Tab use the following settings; Application Language: French Application Region: Italy 5/ Run the unit test and observe the failure. Expected Results: Test pass. Locale.current.identifier should equal "fr_IT" Actual Results: Test fails. Locale.current.identifier equals "en_US" (The Simulator system region and language). Version/Build: Version 10.1 (10B61)
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Duplicate of rdar://43139603