2022-05-17 15:57:59 +00:00
|
|
|
//
|
|
|
|
// URLTests.swift
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Created by Shadowfacts on 5/17/22.
|
|
|
|
//
|
|
|
|
|
|
|
|
import XCTest
|
|
|
|
import WebURL
|
|
|
|
import WebURLFoundationExtras
|
|
|
|
|
|
|
|
class URLTests: XCTestCase {
|
|
|
|
|
|
|
|
func testDecodeURL() {
|
2022-07-09 15:45:27 +00:00
|
|
|
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://見.香港/热狗/🌭"))
|
|
|
|
}
|
2022-05-17 15:57:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|