Unverified Commit def601ac authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] re-enable all tests on windows (#85384)

parent 0b5d99ea
......@@ -276,13 +276,10 @@ Future<void> _runGeneralToolTests() async {
}
Future<void> _runCommandsToolTests() async {
// Due to https://github.com/flutter/flutter/issues/46180, skip the hermetic directory
// on Windows.
final String suffix = Platform.isWindows ? 'permeable' : '';
await _pubRunTest(
path.join(flutterRoot, 'packages', 'flutter_tools'),
forceSingleCore: true,
testPaths: <String>[path.join('test', 'commands.shard', suffix)],
testPaths: <String>[path.join('test', 'commands.shard')],
);
}
......
......@@ -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/cache.dart';
import 'package:flutter_tools/src/commands/generate_localizations.dart';
import 'package:flutter_tools/src/runner/flutter_command.dart';
......@@ -16,8 +17,17 @@ import '../../src/context.dart';
import '../../src/test_flutter_command_runner.dart';
void main() {
FileSystem fileSystem;
setUpAll(() {
Cache.disableLocking();
});
setUp(() {
fileSystem = MemoryFileSystem.test();
});
testUsingContext('default l10n settings', () async {
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
final BufferLogger logger = BufferLogger.test();
final File arbFile = fileSystem.file(fileSystem.path.join('lib', 'l10n', 'app_en.arb'))
..createSync(recursive: true);
......@@ -40,10 +50,12 @@ void main() {
expect(outputDirectory.existsSync(), true);
expect(outputDirectory.childFile('app_localizations_en.dart').existsSync(), true);
expect(outputDirectory.childFile('app_localizations.dart').existsSync(), true);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('not using synthetic packages', () async {
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
final BufferLogger logger = BufferLogger.test();
final Directory l10nDirectory = fileSystem.directory(
fileSystem.path.join('lib', 'l10n'),
......@@ -74,10 +86,12 @@ void main() {
expect(l10nDirectory.existsSync(), true);
expect(l10nDirectory.childFile('app_localizations_en.dart').existsSync(), true);
expect(l10nDirectory.childFile('app_localizations.dart').existsSync(), true);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('throws error when arguments are invalid', () async {
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
final BufferLogger logger = BufferLogger.test();
final File arbFile = fileSystem.file(fileSystem.path.join('lib', 'l10n', 'app_en.arb'))
..createSync(recursive: true);
......@@ -102,10 +116,12 @@ void main() {
]),
throwsToolExit(),
);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('l10n yaml file takes precedence over command line arguments', () async {
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
final BufferLogger logger = BufferLogger.test();
final File arbFile = fileSystem.file(fileSystem.path.join('lib', 'l10n', 'app_en.arb'))
..createSync(recursive: true);
......@@ -132,5 +148,8 @@ void main() {
expect(outputDirectory.existsSync(), true);
expect(outputDirectory.childFile('app_localizations_en.dart').existsSync(), true);
expect(outputDirectory.childFile('app_localizations.dart').existsSync(), true);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => FakeProcessManager.any(),
});
}
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