Skip to content

Commit

Permalink
Add debug log
Browse files Browse the repository at this point in the history
Bug #156
  • Loading branch information
Steelskin committed Oct 3, 2024
1 parent f578048 commit c93c392
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Tests/WinAppDriverTests/AppDriverOptionsTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,23 @@ class AppDriverOptionsTest: XCTestCase {
func testStdoutRedirectToFile() throws {
// Start a new instance of msinfo32 and write the output to a file.
let outputFile = tempFileName()

print("DEBUG Output file: \(outputFile)")

let _ = try MSInfo32App(
winAppDriver: WinAppDriver.start(
outputFile: outputFile
))

// Read the output file.
let output = try String(contentsOfFile: outputFile, encoding: .utf16LittleEndian)
print("DEBUG Output file content: \(output)")

// Delete the file.
try FileManager.default.removeItem(atPath: outputFile)

print("DEBUG Deleted output file: \(outputFile)")

XCTAssert(output.contains("msinfo32"))
}
}

0 comments on commit c93c392

Please sign in to comment.