Skip to content

Commit f219f4f

Browse files
committed
Update testNetrcFile
1 parent a19d241 commit f219f4f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Tests/CommandsTests/PackageToolTests.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ final class PackageToolTests: XCTestCase {
6262
// file at correct location
6363
try execute(["--netrc-file", netrcPath.pathString, "resolve"], packagePath: packageRoot)
6464
// file does not exist, but is optional
65-
let textOutput = try execute(["--netrc-file", "/foo", "--netrc-optional", "resolve"], packagePath: packageRoot).stderr
66-
XCTAssertMatch(textOutput, .contains("warning: Did not find optional .netrc file at /foo."))
65+
let textOutput = try execute(["--netrc-file", "/foo", "resolve"], packagePath: packageRoot).stderr
66+
XCTAssertMatch(textOutput, .contains("warning: Did not find .netrc file at /foo."))
6767

6868
// required file does not exist, will throw
6969
try execute(["--netrc-file", "/foo", "resolve"], packagePath: packageRoot)
7070
} catch {
71-
XCTAssertMatch(String(describing: error), .contains("Cannot find mandatory .netrc file at /foo"))
71+
XCTAssertMatch(String(describing: error), .contains("Did not find .netrc file at /foo."))
7272
}
7373
}
7474

@@ -79,18 +79,18 @@ final class PackageToolTests: XCTestCase {
7979
try execute(["--netrc", "resolve"], packagePath: packageRoot)
8080
} else {
8181
// file does not exist, but is optional
82-
let textOutput = try execute(["--netrc", "--netrc-optional", "resolve"], packagePath: packageRoot)
83-
XCTAssertMatch(textOutput.stderr, .contains("Did not find optional .netrc file at \(localFileSystem.homeDirectory)/.netrc."))
82+
let textOutput = try execute(["--netrc", "resolve"], packagePath: packageRoot)
83+
XCTAssertMatch(textOutput.stderr, .contains("Did not find .netrc file at \(localFileSystem.homeDirectory)/.netrc."))
8484

8585
// file does not exist, but is optional
8686
let textOutput2 = try execute(["--netrc-optional", "resolve"], packagePath: packageRoot)
87-
XCTAssertMatch(textOutput2.stderr, .contains("Did not find optional .netrc file at \(localFileSystem.homeDirectory)/.netrc."))
87+
XCTAssertMatch(textOutput2.stderr, .contains("Did not find .netrc file at \(localFileSystem.homeDirectory)/.netrc."))
8888

8989
// required file does not exist, will throw
9090
try execute(["--netrc", "resolve"], packagePath: packageRoot)
9191
}
9292
} catch {
93-
XCTAssertMatch(String(describing: error), .contains("Cannot find mandatory .netrc file at \(localFileSystem.homeDirectory)/.netrc"))
93+
XCTAssertMatch(String(describing: error), .contains("Did not find .netrc file at \(localFileSystem.homeDirectory)/.netrc"))
9494
}
9595
}
9696
}

0 commit comments

Comments
 (0)