mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
NSStringAPI test: allow to pass under iOS simulator
Swift SVN r20704
This commit is contained in:
@@ -1047,7 +1047,14 @@ NSStringAPIs.test("smallestEncoding") {
|
||||
}
|
||||
|
||||
func getHomeDir() -> String {
|
||||
#if os(OSX)
|
||||
return String.fromCString(getpwuid(getuid()).memory.pw_dir)!
|
||||
#elseif os(iOS)
|
||||
// getpwuid() returns null in sandboxed apps under iOS simulator.
|
||||
return NSHomeDirectory()
|
||||
#else
|
||||
trap("implement")
|
||||
#endif
|
||||
}
|
||||
|
||||
NSStringAPIs.test("stringByAbbreviatingWithTildeInPath") {
|
||||
|
||||
Reference in New Issue
Block a user