Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
added more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Casperhr committed Dec 25, 2016
1 parent a9ccae7 commit 96f892d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Tests/SlugifyTests/SlugifyTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ class SlugifyTests: XCTestCase {
("test", test),
("testRegular", testRegular),
("testAE", testAE),
("testOE", testOE),
("testUnderscore", testUnderscore),
("testSpecialChar1", testSpecialChar1),
("testSpecialChar2", testSpecialChar2),
("testSpecialChar3", testSpecialChar3),
("testSpecialChar4", testSpecialChar4),
]

func test() {
Expand All @@ -19,4 +25,28 @@ class SlugifyTests: XCTestCase {
func testAE() {
XCTAssertEqual("abcae", "abcæ".slugify())
}

func testOE() {
XCTAssertEqual("abco", "abcø".slugify())
}

func testUnderscore() {
XCTAssertEqual("a_a", "a_a".slugify())
}

func testSpecialChar1() {
XCTAssertEqual("a-a", "a^a".slugify())
}

func testSpecialChar2() {
XCTAssertEqual("a-a", "a`a".slugify())
}

func testSpecialChar3() {
XCTAssertEqual("a-a", "a:a".slugify())
}

func testSpecialChar4() {
XCTAssertEqual("a-a", "a€a".slugify())
}
}

0 comments on commit 96f892d

Please sign in to comment.