Skip to content

Commit

Permalink
test: verify output of cli usage (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
robinlieb authored Feb 23, 2024
1 parent e7a6b8a commit 1a7d3fd
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ final class InputSourceManagerCliTests: XCTestCase {
process.waitUntilExit()

let data = pipe.fileHandleForReading.readDataToEndOfFile()
let output = String(data: data, encoding: .utf8)
guard let output = String(data: data, encoding: .utf8) else {
XCTFail()
return
}

XCTAssertEqual(output, "Hello, world!\n")
XCTAssertTrue(output.contains("A Swift command-line tool to orchestrate the input sources on MacOS"))
#endif
}

Expand Down

0 comments on commit 1a7d3fd

Please sign in to comment.