Skip to content

Commit e89e70e

Browse files
committed
test: normalize windows path assertion in pub runner tests
1 parent 6530eaf commit e89e70e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/pub_runner_test.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ void main() {
111111
.single;
112112
expect(compileCall.arguments[2], '--packages');
113113
expect(
114-
compileCall.arguments[3],
115-
endsWith(p.join('.dart_tool', 'package_config.json')),
114+
_normalizedPath(compileCall.arguments[3]),
115+
endsWith('.dart_tool/package_config.json'),
116116
);
117117
expect(
118118
compileCall.arguments.last,
@@ -304,6 +304,8 @@ Future<void> main(List<String> args) async => launchExecutable();
304304
});
305305
}
306306

307+
String _normalizedPath(String value) => value.replaceAll('\\', '/');
308+
307309
Future<void> _writePackageFixture(
308310
Directory sandbox, {
309311
required String package,

0 commit comments

Comments
 (0)