Skip to content

Commit

Permalink
Update for Xcode 10 .xcresult file format.
Browse files Browse the repository at this point in the history
  • Loading branch information
babbage committed Mar 2, 2019
1 parent 408d592 commit 875448a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* [#68](https://github.com/Antondomashnev/FBSnapshotsViewer/pull/68): Fix error and add step to contributor text. - [@babbage](https://github.com/babbage).
* [#69](https://github.com/Antondomashnev/FBSnapshotsViewer/pull/69): Replace Swap with Accept and Accept All. - [@babbage](https://github.com/babbage).
* [#70](https://github.com/Antondomashnev/FBSnapshotsViewer/pull/70): Remove accepted images from failed image path. - [@babbage](https://github.com/babbage).
* [#76](https://github.com/Antondomashnev/FBSnapshotsViewer/pull/71): Update for Xcode 10 .xcresult file format. - [@babbage](https://github.com/babbage).

### 0.8.0 (11.10.2017)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ class FolderEventsListenerFactory {
/*
Example of Xcode8 path: .../Logs/Test/FFCD258F-DE70-4B03-A32D-3065E248C0A7/Session-FBSnapshotsViewerExampleTests-2017-08-01_225044-7QQdug.log
Example of Xcode9 path: .../Logs/Test/Diagnostics/FBSnapshotsViewerExampleTests-7BBCF944-204D-4F76-8491-D6E8392F1E98/Session-FBSnapshotsViewerExampleTests-2017-08-01_223254-O0ChTG.log
Example of Xcode10 path: .../⁨Logs/Test⁩/FBSnapshotsViewer-2019.03.01_22-42-56-+1300.xcresult⁩/1_Test⁩/⁨Diagnostics⁩/⁨FBSnapshotsViewerExampleTests-D0BABE76-D6E5-4A71-81D9-D98658CA4449⁩/⁨FBSnapshotsViewerExampleTests-C79B8C3C-9B9C-4686-B26B-C7902EC990A2⁩/Session-FBSnapshotsViewerExampleTests-2019-03-01_224259-if2SeO.log
*/
pathRegex = "/Logs/Test(/Diagnostics/.+-[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}|/[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12})/.+log$"
}
pathRegex = "/Logs/Test/Test-.+-[0-9]{4}.[0-9]{2}.[0-9]{2}_[0-9]{2}-[0-9]{2}-[0-9]{2}-[+-][0-9]{3,4}.xcresult/[0-1]+_Test/Diagnostics/.+-[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}/.+-[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}/Session-.+-[0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{5,6}-.+.log$"
}
return NonRecursiveFolderEventsListener(folderPath: derivedDataFolder.path, filter: FolderEventFilter.known & FolderEventFilter.type(.file) & FolderEventFilter.pathRegex(pathRegex))
}
}
4 changes: 2 additions & 2 deletions FBSnapshotsViewerTests/FolderEventsListenerFactorySpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class FolderEventsListenerFactorySpec: QuickSpec {
}

it("returns correct listener") {
let expectedFilter = FolderEventFilter.known & FolderEventFilter.type(.file) & FolderEventFilter.pathRegex("/Logs/Test(/Diagnostics/.+-[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}|/[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12})/.+log$")
let expectedFilter = FolderEventFilter.known & FolderEventFilter.type(.file) & FolderEventFilter.pathRegex("/Logs/Test/Test-.+-[0-9]{4}.[0-9]{2}.[0-9]{2}_[0-9]{2}-[0-9]{2}-[0-9]{2}-[+-][0-9]{3,4}.xcresult/[0-1]+_Test/Diagnostics/.+-[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}/.+-[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}/Session-.+-[0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{5,6}-.+.log$")
expect(listener.folderPath).to(equal(derivedDataFolder.path))
expect(listener.filter).to(equal(expectedFilter))
}
Expand All @@ -43,7 +43,7 @@ class FolderEventsListenerFactorySpec: QuickSpec {
}

it("returns correct listener") {
let expectedFilter = FolderEventFilter.known & FolderEventFilter.type(.file) & FolderEventFilter.pathRegex("/Logs/Test(/Diagnostics/.+-[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}|/[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12})/.+log$")
let expectedFilter = FolderEventFilter.known & FolderEventFilter.type(.file) & FolderEventFilter.pathRegex("/Logs/Test/Test-.+-[0-9]{4}.[0-9]{2}.[0-9]{2}_[0-9]{2}-[0-9]{2}-[0-9]{2}-[+-][0-9]{3,4}.xcresult/[0-1]+_Test/Diagnostics/.+-[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}/.+-[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}/Session-.+-[0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{5,6}-.+.log$")
expect(listener.folderPath).to(equal(derivedDataFolder.path))
expect(listener.filter).to(equal(expectedFilter))
}
Expand Down

0 comments on commit 875448a

Please sign in to comment.