| Index: utils/tests/pub/pub_test.dart
|
| diff --git a/utils/tests/pub/pub_test.dart b/utils/tests/pub/pub_test.dart
|
| index 8b302d54885eb4f00dbc1c99d2a8ab315ac3c4da..4bfb2a331d5f62cc7f588690d466238c2d92a592 100644
|
| --- a/utils/tests/pub/pub_test.dart
|
| +++ b/utils/tests/pub/pub_test.dart
|
| @@ -204,6 +204,112 @@ dependencies:
|
| output: const RegExp("Dependencies installed!\$"));
|
| });
|
| });
|
| +
|
| + test('checks out a package from a pub server', () {
|
| + servePackages("localhost", 3123, ['{name: foo, version: 1.2.3}']);
|
| +
|
| + dir(appPath, [
|
| + file('pubspec.yaml', '''
|
| +dependencies:
|
| + foo:
|
| + repo:
|
| + name: foo
|
| + url: http://localhost:3123
|
| + version: 1.2.3
|
| +''')
|
| + ]).scheduleCreate();
|
| +
|
| + dir(cachePath, [
|
| + dir('repo', [
|
| + dir('localhost%583123', [
|
| + dir('foo-1.2.3', [
|
| + file('pubspec.yaml', '{name: foo, version: 1.2.3}'),
|
| + file('foo.dart', 'main() => print("foo 1.2.3");')
|
| + ])
|
| + ])
|
| + ])
|
| + ]).scheduleValidate();
|
| +
|
| + dir(packagesPath, [
|
| + dir('foo', [
|
| + file('pubspec.yaml', '{name: foo, version: 1.2.3}'),
|
| + file('foo.dart', 'main() => print("foo 1.2.3");')
|
| + ])
|
| + ]).scheduleValidate();
|
| +
|
| + runPub(args: ['install'],
|
| + output: const RegExp("Dependencies installed!\$"));
|
| + });
|
| +
|
| + test('checks out packages transitively from a pub server', () {
|
| + servePackages("localhost", 3123, [
|
| + '''
|
| +name: foo
|
| +version: 1.2.3
|
| +dependencies:
|
| + bar:
|
| + repo: {name: bar, url: http://localhost:3123}
|
| + version: 2.0.4
|
| +''',
|
| + '{name: bar, version: 2.0.3}',
|
| + '{name: bar, version: 2.0.4}',
|
| + '{name: bar, version: 2.0.5}',
|
| + ]);
|
| +
|
| + dir(appPath, [
|
| + file('pubspec.yaml', '''
|
| +dependencies:
|
| + foo:
|
| + repo:
|
| + name: foo
|
| + url: http://localhost:3123
|
| + version: 1.2.3
|
| +''')
|
| + ]).scheduleCreate();
|
| +
|
| + dir(cachePath, [
|
| + dir('repo', [
|
| + dir('localhost%583123', [
|
| + dir('foo-1.2.3', [
|
| + file('pubspec.yaml', '''
|
| +name: foo
|
| +version: 1.2.3
|
| +dependencies:
|
| + bar:
|
| + repo: {name: bar, url: http://localhost:3123}
|
| + version: 2.0.4
|
| +'''),
|
| + file('foo.dart', 'main() => print("foo 1.2.3");')
|
| + ]),
|
| + dir('bar-2.0.4', [
|
| + file('pubspec.yaml', '{name: bar, version: 2.0.4}'),
|
| + file('bar.dart', 'main() => print("bar 2.0.4");')
|
| + ])
|
| + ])
|
| + ])
|
| + ]).scheduleValidate();
|
| +
|
| + dir(packagesPath, [
|
| + dir('foo', [
|
| + file('pubspec.yaml', '''
|
| +name: foo
|
| +version: 1.2.3
|
| +dependencies:
|
| + bar:
|
| + repo: {name: bar, url: http://localhost:3123}
|
| + version: 2.0.4
|
| +'''),
|
| + file('foo.dart', 'main() => print("foo 1.2.3");')
|
| + ]),
|
| + dir('bar', [
|
| + file('pubspec.yaml', '{name: bar, version: 2.0.4}'),
|
| + file('bar.dart', 'main() => print("bar 2.0.4");')
|
| + ])
|
| + ]).scheduleValidate();
|
| +
|
| + runPub(args: ['install'],
|
| + output: const RegExp("Dependencies installed!\$"));
|
| + });
|
| }
|
|
|
| versionCommand() {
|
|
|