Commit 95f6af35 authored by Johannes Schriewer's avatar Johannes Schriewer

Merge branch 'master' into develop

* master:
  Enable URL tests
  Update to swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a

# Conflicts:
#	src/logger.swift
parents 77508d7a 0dffccf9
Pipeline #1952 passed with stage
......@@ -164,9 +164,12 @@ public struct Path {
/// that's not available
public static func homeDirectory() -> Path? {
let home = getenv("HOME")
if let s = String(validatingUTF8: home) {
return Path(s)
if let h = home {
if let s = String(validatingUTF8: h) {
return Path(s)
}
}
return nil
}
......
......@@ -25,5 +25,6 @@ XCTMain([
testCase(PathTests.allTests),
testCase(DateTests.allTests),
testCase(LoggerTests.allTests),
testCase(FSTests.allTests)
testCase(FSTests.allTests),
testCase(URLTests.allTests)
])
......@@ -27,7 +27,7 @@ class URLTests: XCTestCase {
}
func testURLParse1() {
let url = URL(string: "http://google.com/")
let url = atfoundation.URL(string: "http://google.com/")
XCTAssert(url.schema == "http")
XCTAssert(url.domain == "google.com", url.domain)
XCTAssert(url.path.description == "/")
......@@ -36,7 +36,7 @@ class URLTests: XCTestCase {
}
func testURLParse2() {
let url = URL(string: "https://user:password@example.com/path/here?parameter=value%20here#fragment")
let url = atfoundation.URL(string: "https://user:password@example.com/path/here?parameter=value%20here#fragment")
XCTAssert(url.schema == "https")
XCTAssert(url.domain == "example.com", url.domain)
XCTAssert(url.fragment == "fragment", "\(url.fragment)")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment