File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import XCTest
4
4
///
5
5
/// diffTool = "ksdiff"
6
6
public var diffTool : String ? = nil
7
+ public var diffToolSuffix : String = " "
7
8
8
9
/// Whether or not to record all new references.
9
10
public var isRecording = false
@@ -299,7 +300,7 @@ public func verifySnapshot<Value, Format>(
299
300
}
300
301
301
302
let diffMessage = diffTool
302
- . map { " \( $0) \" \( snapshotFileUrl. path) \" \" \( failedSnapshotFileUrl. path) \" " }
303
+ . map { " \( $0) \" \( snapshotFileUrl. path) \" \" \( failedSnapshotFileUrl. path) \" \( diffToolSuffix ) " }
303
304
?? """
304
305
@ \( minus)
305
306
" \( snapshotFileUrl. path) "
@@ -309,6 +310,10 @@ public func verifySnapshot<Value, Format>(
309
310
To configure output for a custom diff tool, like Kaleidoscope:
310
311
311
312
SnapshotTesting.diffTool = " ksdiff "
313
+
314
+ or ImageMagick:
315
+ SnapshotTesting.diffTool = " magick compare "
316
+ SnapshotTesting.diffToolSuffix = " diff.png && open diff.png "
312
317
"""
313
318
314
319
let failureMessage : String
You can’t perform that action at this time.
0 commit comments