anchor.diff:            "pkgB_b() { pkgA(); }");
   
         // Application.
  -      file = File('${tempDir.path}/app/.packages')..createSync(recursive: true);
  -      file.writeAsStringSync("pkgA:../pkgA\n"
  -          "pkgB:../pkgB");
  -
  +      File('${tempDir.path}/app/.dart_tool/package_config.json')
  +        ..createSync(recursive: true)
  +        ..writeAsStringSync('''
  +  {
  +    "configVersion": 2,
  +    "packages": [
  +      {
  +        "name": "pkgA",
  +        "rootUri": "${tempDir.path}/pkgA",
  +        "packageUri": "./"
  +      },
  +      {
  +        "name": "pkgB",
  +        "rootUri": "${tempDir.path}/pkgB",
  +        "packageUri": "./"
  +      }
  +    ]
  +  }
  +''');
         // Entry point A uses both package A and B.
         file = File('${tempDir.path}/app/a.dart')..createSync(recursive: true);
         file.writeAsStringSync("import 'package:pkgB/b.dart';"
  
positive.code:         var main = File('${tempDir.path}/foo.dart')..createSync();
          main.writeAsStringSync(
              "import 'package:foo/foo.dart'; main() {print(foo);}\n");
          File('${tempDir.path}/.packages')
            ..createSync()
            ..writeAsStringSync("\nfoo:http://$host:$port/packages/foo");
          File('${tempDir.path}/packages/foo/foo.dart')
            ..createSync(recursive: true)
            ..writeAsStringSync("var foo = 'hello';");
  
negative.code:     {
        "name": "flutter",
        "rootUri": "${frameworkDirectory.uri}",
        "packageUri": "lib/"
      }
    ]
  }
  