Skip to content

Commit cf218ca

Browse files
committed
fix(test): use /dev/null path for write-failure test on Linux
The test used /nonexistent/directory/ which root can create on Linux CI, causing XCTAssertFalse(fileExists) to fail. /dev/null is a character device so createDirectory always fails regardless of permissions.
1 parent 9dc6bba commit cf218ca

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Tests/ExFigTests/Report/ExportReportIntegrationTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ final class ExportReportIntegrationTests: XCTestCase {
9393

9494
func testReportWriteFailureDoesNotThrow() {
9595
let ui = TerminalUI(outputMode: .quiet)
96-
let invalidPath = "/nonexistent/directory/report.json"
96+
// /dev/null is a character device, not a directory — createDirectory fails even as root
97+
let invalidPath = "/dev/null/report.json"
9798

9899
let report = ExportReport(
99100
version: ExportReport.currentVersion,

0 commit comments

Comments
 (0)