forked from firka/flutter
@@ -7,6 +7,7 @@
|
||||
import 'package:file/memory.dart';
|
||||
import 'package:flutter_tools/src/base/file_system.dart';
|
||||
import 'package:flutter_tools/src/base/logger.dart';
|
||||
import 'package:flutter_tools/src/base/multi_root_file_system.dart';
|
||||
import 'package:flutter_tools/src/base/platform.dart';
|
||||
import 'package:flutter_tools/src/convert.dart';
|
||||
import 'package:flutter_tools/src/run_hot.dart';
|
||||
@@ -164,5 +165,36 @@ void main() {
|
||||
expect(nextInvalidationResult.packageConfig,
|
||||
isNot(invalidationResult.packageConfig));
|
||||
});
|
||||
|
||||
testWithoutContext('Works with MultiRootFileSystem uris, asyncScanning: $asyncScanning', () async {
|
||||
final FileSystem fileSystem = MemoryFileSystem.test();
|
||||
final FileSystem multiRootFileSystem = MultiRootFileSystem(
|
||||
delegate: fileSystem,
|
||||
scheme: 'scheme',
|
||||
roots: <String>[
|
||||
'/root',
|
||||
],
|
||||
);
|
||||
final ProjectFileInvalidator projectFileInvalidator = ProjectFileInvalidator(
|
||||
fileSystem: multiRootFileSystem,
|
||||
platform: FakePlatform(),
|
||||
logger: BufferLogger.test(),
|
||||
);
|
||||
|
||||
expect(
|
||||
(await projectFileInvalidator.findInvalidated(
|
||||
lastCompiled: inFuture,
|
||||
urisToMonitor: <Uri>[
|
||||
Uri.parse('file1'),
|
||||
Uri.parse('file:///file2'),
|
||||
Uri.parse('scheme:///file3'),
|
||||
],
|
||||
packagesPath: '.packages',
|
||||
asyncScanning: asyncScanning,
|
||||
packageConfig: PackageConfig.empty,
|
||||
)).uris,
|
||||
isEmpty,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user