Fix crash during artifact download (#14147)
This commit is contained in:
committed by
GitHub
parent
bf7cc09625
commit
a67df9e1d1
@@ -77,6 +77,14 @@ void main() {
|
||||
verify(artifact2.update());
|
||||
});
|
||||
});
|
||||
|
||||
testUsingContext('flattenNameSubdirs', () {
|
||||
expect(flattenNameSubdirs(Uri.parse('http://flutter.io/foo/bar')), 'flutter.io/foo/bar');
|
||||
expect(flattenNameSubdirs(Uri.parse('http://docs.flutter.io/foo/bar')), 'docs.flutter.io/foo/bar');
|
||||
expect(flattenNameSubdirs(Uri.parse('https://www.flutter.io')), 'www.flutter.io');
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => new MockFileSystem(),
|
||||
});
|
||||
}
|
||||
|
||||
class MockFileSystem extends MemoryFileSystem {
|
||||
|
||||
Reference in New Issue
Block a user