Skip to content

Add tests for invalid hostmasks #9

Open
@kylef

Description

@kylef

I've seen in the wild servers send host mask components in the incorrect order. We should include a test to ensure that the support in wrong order is correct.

class NickTests: XCTestCase {
  // ...
 
  func testNickInitializationFromHostmaskWithWrongOrder() {
    let nick = Nick(hostmask: "kyle@hostname!ident")
 
    XCTAssertEqual(nick.nickname, "kyle")
    XCTAssertEqual(nick.ident, "ident")
    XCTAssertEqual(nick.hostname, "hostname!ident")
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions