Skip to content

Commit 7c6c80a

Browse files
authored
Update file name generation (#100)
1 parent 3c1640f commit 7c6c80a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: lib/src/screenshot/screenshot.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Future<Screenshot> takeScreenshot({
8181
final file = frame?.uri.pathSegments.last.replaceFirst('.dart', '');
8282
final line = frame?.line;
8383
if (file != null && line != null) {
84-
return '$file:$line';
84+
return '${file}_$line';
8585
}
8686
if (file != null) {
8787
return file;

Diff for: test/screenshot/screenshot_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ void main() {
178178
testWidgets('screenshot file name contains test file name', (tester) async {
179179
final shot = await takeScreenshot();
180180
final lineNumber = _currentLineNumber() - 1;
181-
expect(shot.file.name, contains('screenshot_test:$lineNumber'));
181+
expect(shot.file.name, contains('screenshot_test_$lineNumber'));
182182
});
183183

184184
testWidgets('name gets escaped to prevent slashes', (tester) async {

0 commit comments

Comments
 (0)