Unverified Commit 4471282d authored by Jia Hao's avatar Jia Hao Committed by GitHub

[flutter_tools] Normalize paths before checking for Integration Tests (#79521)

parent 132b071f
......@@ -273,7 +273,7 @@ class TestCommand extends FlutterCommand with DeviceBasedDevelopmentArtifacts {
if (globals.fs.isDirectorySync(path))
..._findTests(globals.fs.directory(path))
else
globals.fs.path.absolute(path)
globals.fs.path.normalize(globals.fs.path.absolute(path))
];
}
......
......@@ -446,6 +446,27 @@ dev_dependencies:
]),
});
testUsingContext('when absolute unnormalized path to integration test is passed', () async {
final FakePackageTest fakePackageTest = FakePackageTest();
final TestCommand testCommand = TestCommand(testWrapper: fakePackageTest);
final CommandRunner<void> commandRunner = createTestCommandRunner(testCommand);
await commandRunner.run(const <String>[
'test',
'--no-pub',
'/package/../package/integration_test/some_integration_test.dart',
]);
expect(testCommand.isIntegrationTest, true);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
DeviceManager: () => _FakeDeviceManager(<Device>[
FakeDevice('ephemeral', 'ephemeral', type: PlatformType.android),
]),
});
testUsingContext('when both test and integration test are passed', () async {
final FakeFlutterTestRunner testRunner = FakeFlutterTestRunner(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment