Chromium Code Reviews| Index: sdk/lib/_internal/pub/test/test_pub.dart |
| diff --git a/sdk/lib/_internal/pub/test/test_pub.dart b/sdk/lib/_internal/pub/test/test_pub.dart |
| index 2c85e8c3917f24f0d458de48dabf57f63ed33834..3f691304868eb20e3e14701ec7ecf6a073cdd30f 100644 |
| --- a/sdk/lib/_internal/pub/test/test_pub.dart |
| +++ b/sdk/lib/_internal/pub/test/test_pub.dart |
| @@ -32,6 +32,8 @@ import '../lib/src/lock_file.dart'; |
| import '../lib/src/log.dart' as log; |
| import '../lib/src/package.dart'; |
| import '../lib/src/safe_http_server.dart'; |
| +import '../lib/src/source/path.dart'; |
| +import '../lib/src/source_registry.dart'; |
| import '../lib/src/system_cache.dart'; |
| import '../lib/src/utils.dart'; |
| import '../lib/src/validator.dart'; |
| @@ -605,6 +607,10 @@ void ensureGit() { |
| }, 'ensuring that Git is installed'); |
| } |
| +/// Lists all the sources required for tests. |
| +final SourceRegistry _sources = new SourceRegistry() |
| + ..register(new PathSource()); |
|
Bob Nystrom
2013/10/28 22:13:32
Since this is just used in one method, let's just
Anton Moiseev
2013/11/03 11:11:43
Done.
|
| + |
| /// Create a lock file for [package] without running `pub get`. |
| /// |
| /// This creates a lock file with only path dependencies. [sandbox] is a list of |
| @@ -648,7 +654,9 @@ void createLockFile(String package, {Iterable<String> sandbox, |
| }); |
| lockFile.packages[name] = id; |
| }); |
| - d.file(path.join(package, 'pubspec.lock'), lockFile.serialize()).create(); |
| + |
| + d.file(path.join(package, 'pubspec.lock'), |
| + lockFile.serialize(null, _sources)).create(); |
| } |
| /// Use [client] as the mock HTTP client for this test. |