anchor.diff:  import 'dart:convert';
   
   import 'package:file/file.dart';
  +import 'package:file/memory.dart';
   
   import 'package:flutter_tools/src/asset.dart';
   import 'package:flutter_tools/src/base/file_system.dart';
  +import 'package:flutter_tools/src/base/platform.dart';
   import 'package:flutter_tools/src/cache.dart';
   
   import 'src/common.dart';
   import 'src/context.dart';
  +import 'src/pubspec_schema.dart';
   
   void main() {
  -  // These tests do not use a memory file system because we want to ensure that
  -  // asset bundles work correctly on Windows and Posix systems.
  -  Directory tempDir;
  -  Directory oldCurrentDir;
  -
  -  setUp(() async {
  -    tempDir = fs.systemTempDirectory.createTempSync('flutter_asset_bundle_variant_test.');
  -    oldCurrentDir = fs.currentDirectory;
  -    fs.currentDirectory = tempDir;
  -  });
  -
  -  tearDown(() {
  -    fs.currentDirectory = oldCurrentDir;
  -    tryToDelete(tempDir);
  -  });
  +  String fixPath(String path) {
  +    // The in-memory file system is strict about slashes on Windows being the
  +    // correct way so until https://github.com/google/file.dart/issues/112 is
  +    // fixed we fix them here.
  +    // TODO(dantup): Remove this function once the above issue is fixed and
  +    // rolls into Flutter.
  +    return path?.replaceAll('/', fs.path.separator);
  +  }
   
     group('AssetBundle asset variants', () {
  +    FileSystem testFileSystem;
  +    setUp(() async {
  +      testFileSystem = new MemoryFileSystem(
  +        style: platform.isWindows
  +          ? FileSystemStyle.windows
  +          : FileSystemStyle.posix,
  +      );
  +      testFileSystem.currentDirectory = testFileSystem.systemTempDirectory.createTempSync('flutter_asset_bundle_variant_test.');
  +    });
  +
       testUsingContext('main asset and variants', () async {
         // Setting flutterRoot here so that it picks up the MemoryFileSystem's
         // path separator.
         Cache.flutterRoot = getFlutterRoot();
  +      writeEmptySchemaFile(fs);
   
         fs.file('pubspec.yaml')
           ..createSync()
  
positive.code:         'a/b/c/var3/foo',
        ];
        for (String asset in assets) {
          fs.file(asset)
            ..createSync(recursive: true)
            ..writeAsStringSync(asset);
        }
  
negative.code:         expect(bundle.entries.containsKey(asset), true);
          expect(utf8.decode(await bundle.entries[asset].contentsAsBytes()), asset);
        }
      }, overrides: <Type, Generator>{
        FileSystem: () => testFileSystem,
      });
    });
  }
  