Skip to content

Commit

Permalink
Add test cases for capital cased pattern URL
Browse files Browse the repository at this point in the history
  • Loading branch information
giginet committed Aug 5, 2019
1 parent 1dcb5f7 commit a9797b2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Tests/CrossroadTests/PatternURLTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ final class PatternURLTests: XCTestCase {
XCTAssertEqual(patternURL.pathComponents, [])
}

func testCapitalCase() {
let subject = PatternURL(string: "FOOBAR://FOO/BAR")!
XCTAssertEqual(subject.patternString,
"foobar://foo/bar")
XCTAssertEqual(subject.scheme, "foobar")
XCTAssertEqual(subject.host, "foo")
XCTAssertEqual(subject.pathComponents, ["/", "bar"])
}

func testParseWithKeyword() {
let url0 = PatternURL(string: "foobar://search/:keyword")
XCTAssertEqual(url0?.scheme, "foobar")
Expand Down

0 comments on commit a9797b2

Please sign in to comment.