Skip to content

Commit

Permalink
Add unit test case for #1175
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuyuzhou committed Oct 30, 2019
1 parent ab6b6d4 commit 9f6fbd1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ShadowsocksX-NGTests/ServerProfileTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ class ServerProfileTests: XCTestCase {
XCTAssertNotNil(profile)
XCTAssertEqual(profile?.password, "test/!@#:")
}

func testInitWithLegacyURLWithEscapedChineseRemark() {
let url = URL(string: "ss://YmYtY2ZiOnRlc3RAMTkyLjE2OC4xMDAuMTo4ODg4#%e4%bd%a0%e5%a5%bd")!
let profile = ServerProfile(url: url)
XCTAssertNotNil(profile)
XCTAssertEqual(profile?.remark, "你好")
}

func testInitWithEmptyURL() {
let url = URL(string: "ss://")!
Expand Down

0 comments on commit 9f6fbd1

Please sign in to comment.