2022-05-17 11:57:59 -04:00
|
|
|
//
|
|
|
|
// URLTests.swift
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Created by Shadowfacts on 5/17/22.
|
|
|
|
//
|
|
|
|
|
|
|
|
import XCTest
|
|
|
|
import WebURL
|
|
|
|
import WebURLFoundationExtras
|
|
|
|
|
|
|
|
class URLTests: XCTestCase {
|
|
|
|
|
|
|
|
func testDecodeURL() {
|
2022-07-09 11:45:27 -04: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 11:57:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|