Skip to content

Commit

Permalink
Fix path on Windows test
Browse files Browse the repository at this point in the history
[email protected], [email protected], [email protected]

Bug: #54903
Change-Id: I132ef3385cdde03ab73df194414a38f9fd9927a9
Cq-Include-Trybots: luci.dart.try:pkg-win-release-try,pkg-win-release-arm64-try,pkg-mac-release-try,pkg-mac-release-arm64-try,pkg-linux-release-try,pkg-linux-release-arm64-try,pkg-linux-debug-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352240
Reviewed-by: Ben Konyi <[email protected]>
Auto-Submit: Kzrnm <[email protected]>
Commit-Queue: Siva Annamalai <[email protected]>
Reviewed-by: Daco Harkes <[email protected]>
Reviewed-by: Siva Annamalai <[email protected]>
  • Loading branch information
kzrnm authored and Commit Queue committed Feb 14, 2024
1 parent a92ac02 commit 47c93a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/dartdev/test/commands/analyze_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -617,13 +617,14 @@ void f() {
expect(result.exitCode, 3);
expect(result.stderr, isEmpty);

final escapedSeparator = path.separator.replaceAll('\\', '\\\\');
final stdout = result.stdout.trim();
expect(
stdout,
startsWith(
'{"version":1,"diagnostics":[{"code":"return_of_invalid_type",'));
expect(stdout, endsWith('}'));
expect(stdout, contains('lib${path.separator}main.dart'));
expect(stdout, contains('lib${escapedSeparator}main.dart'));
expect(stdout, contains('"line":1,"column":16'));
expect(stdout, contains('"problemMessage":"A value of type '));
});
Expand Down Expand Up @@ -704,9 +705,10 @@ void f() {
expect(result.exitCode, 3);
expect(result.stderr, isEmpty);

final escapedSeparator = path.separator.replaceAll('\\', '\\\\');
final stdout = result.stdout.trim();
expect(stdout, contains('|A value of type '));
expect(stdout, contains('lib${path.separator}main.dart|1|16|'));
expect(stdout, contains('lib${escapedSeparator}main.dart|1|16|'));
});
});
test('short', () {
Expand Down

0 comments on commit 47c93a9

Please sign in to comment.