forked from shadowfacts/Tusker
26 lines
757 B
Swift
26 lines
757 B
Swift
//
|
|
// URLTests.swift
|
|
//
|
|
//
|
|
// Created by Shadowfacts on 5/17/22.
|
|
//
|
|
|
|
import XCTest
|
|
import WebURL
|
|
import WebURLFoundationExtras
|
|
|
|
class URLTests: XCTestCase {
|
|
|
|
func testDecodeURL() {
|
|
XCTAssertNotNil(WebURL(URL(string: "https://xn--baw-joa.social/@unituebingen")!))
|
|
XCTAssertNotNil(WebURL("https://xn--baw-joa.social/@unituebingen"))
|
|
XCTAssertNotNil(URLComponents(string: "https://xn--baw-joa.social/test/é"))
|
|
XCTAssertNotNil(WebURL("https://xn--baw-joa.social/test/é"))
|
|
if #available(iOS 16.0, *) {
|
|
XCTAssertNotNil(try? URL.ParseStrategy().parse("https://xn--baw-joa.social/test/é"))
|
|
XCTAssertNotNil(try? URL.ParseStrategy().parse("http://見.香港/热狗/🌭"))
|
|
}
|
|
}
|
|
|
|
}
|