mirror of
https://github.com/HaishinKit/HaishinKit.swift.git
synced 2026-05-07 20:12:28 +00:00
20 lines
546 B
Swift
20 lines
546 B
Swift
import AVFoundation
|
|
import Foundation
|
|
import Testing
|
|
|
|
@testable import RTMPHaishinKit
|
|
|
|
@Suite struct RTMPURLTests {
|
|
@Test func main() {
|
|
let url = RTMPURL(url: URL(string: "rtmp://localhost/live/live")!)
|
|
#expect(url.streamName == "live")
|
|
#expect(url.command == "rtmp://localhost/live")
|
|
}
|
|
|
|
@Test func query() {
|
|
let url = RTMPURL(url: URL(string: "rtmp://localhost/live/live?parameter")!)
|
|
#expect(url.streamName == "live?parameter")
|
|
#expect(url.command == "rtmp://localhost/live")
|
|
}
|
|
}
|