     case openError(Int32, String)
 }
 
+/// Creates a stream channel to the given file path
 func channelZFile(_ path: String, queue: DispatchQueue = DispatchQueue.global(qos: .default), low: Int? = nil, high: Int? = nil, interval: DispatchTimeInterval? = nil, strict: Bool = false) -> Channel<DispatchIO, InputStreamEvent> {
     let receivers = ReceiverQueue<InputStreamEvent>()
 

        waitForExpectations(timeout: 30, handler: { err in })

        let swstr = String(view)
        let nsstr = (try? NSString(contentsOfFile: file, encoding: String.Encoding.utf8.rawValue)) ?? "XXX"

        XCTAssertTrue(String(describing: nsstr) == swstr, "file contents did not match: \(swstr.utf16.count) vs. \(nsstr.length)")
    }
}


        return rnd
    }

    func testDispatchFile() throws {
        
        weak var xpc = expectation(description: #function)

        let file = #file
        var view = String.UnicodeScalarView()
        var encoding = UTF8()

        let high = Int(rnd(1024)) + 10
            // high=2 => decoding error
