File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed
Tests/ReleaseNotesCoreTests Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,12 @@ import Darwin
66enum Parser {
77
88 static let progress = Skip (
9- " Updating " . orElse ( " Updated " ) . orElse ( " Computing " ) . orElse ( " Computed " )
9+ " Updating "
10+ . orElse ( " Updated " )
11+ . orElse ( " Computing " )
12+ . orElse ( " Computed " )
13+ . orElse ( " Creating working copy " )
14+ . orElse ( " Working copy of " )
1015 )
1116 . skip ( Prefix { $0 != " \n " } )
1217
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ struct ReleaseNotes: AsyncParsableCommand {
2222 }
2323
2424 guard let updates = Parser . packageUpdate. parse ( output) else {
25- print ( " Failed to parse results from package update: \n " )
26- print ( output)
25+ print ( " Failed to parse results from package update. \n " )
26+ print ( " Please file an issue with the the output above. " )
2727 return
2828 }
2929
Original file line number Diff line number Diff line change @@ -25,6 +25,16 @@ final class ParserCoreTests: XCTestCase {
2525 XCTAssertNotNil ( Parser . progress. parse ( & input) )
2626 XCTAssertEqual ( input, " " )
2727 }
28+ do {
29+ var input = " Creating working copy for https://github.com/JohnSundell/Plot.git " [ ... ]
30+ XCTAssertNotNil ( Parser . progress. parse ( & input) )
31+ XCTAssertEqual ( input, " " )
32+ }
33+ do {
34+ var input = " Working copy of https://github.com/JohnSundell/Plot.git resolved at 0.10.0 " [ ... ]
35+ XCTAssertNotNil ( Parser . progress. parse ( & input) )
36+ XCTAssertEqual ( input, " " )
37+ }
2838 }
2939
3040 func test_anyProgress( ) throws {
@@ -41,6 +51,8 @@ final class ParserCoreTests: XCTestCase {
4151 Computed https://github.com/SwiftPackageIndex/SemanticVersion at 0.3.1 (0.01s)
4252 Computing version for https://github.com/apple/swift-argument-parser
4353 Computed https://github.com/apple/swift-argument-parser at 1.0.2 (0.01s)
54+ Creating working copy for https://github.com/JohnSundell/Plot.git
55+ Working copy of https://github.com/JohnSundell/Plot.git resolved at 0.10.0
4456 """ [ ... ]
4557 XCTAssertNotNil ( Parser . anyProgress. parse ( & input) )
4658 XCTAssertEqual ( input, " " )
You can’t perform that action at this time.
0 commit comments