| Index: sdk/lib/_internal/pub/test/snapshot/updates_snapshot_for_git_dependency_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/snapshot/upgrades_snapshot_test.dart b/sdk/lib/_internal/pub/test/snapshot/updates_snapshot_for_git_dependency_test.dart
|
| similarity index 53%
|
| copy from sdk/lib/_internal/pub/test/snapshot/upgrades_snapshot_test.dart
|
| copy to sdk/lib/_internal/pub/test/snapshot/updates_snapshot_for_git_dependency_test.dart
|
| index 10aefb6bbb2024f0bb5d5ff1fb0ae97c20eee4c1..c1c1f68d1267989c8755a959ea46a0ff66f3d589 100644
|
| --- a/sdk/lib/_internal/pub/test/snapshot/upgrades_snapshot_test.dart
|
| +++ b/sdk/lib/_internal/pub/test/snapshot/updates_snapshot_for_git_dependency_test.dart
|
| @@ -12,39 +12,41 @@ import '../test_pub.dart';
|
|
|
| main() {
|
| initConfig();
|
| - integration("upgrades a snapshot when its package is upgraded", () {
|
| - servePackages((builder) {
|
| - builder.serve("foo", "1.2.3", contents: [
|
| - d.dir("bin", [
|
| - d.file("hello.dart", "void main() => print('hello!');")
|
| - ])
|
| - ]);
|
| - });
|
| + integration("upgrades a snapshot when a git dependency is upgraded", () {
|
| + ensureGit();
|
|
|
| - d.appDir({"foo": "any"}).create();
|
| + d.git('foo.git', [
|
| + d.pubspec({
|
| + "name": "foo",
|
| + "version": "0.0.1"
|
| + }),
|
| + d.dir("bin", [
|
| + d.file("hello.dart", "void main() => print('Hello!');")
|
| + ])
|
| + ]).create();
|
| +
|
| + d.appDir({"foo": {"git": "../foo.git"}}).create();
|
|
|
| pubGet(output: contains("Precompiled foo:hello."));
|
|
|
| d.dir(p.join(appPath, '.pub', 'bin', 'foo'), [
|
| - d.matcherFile('hello.dart.snapshot', contains('hello!'))
|
| + d.matcherFile('hello.dart.snapshot', contains('Hello!'))
|
| ]).validate();
|
|
|
| - servePackages((builder) {
|
| - builder.serve("foo", "1.2.4", contents: [
|
| - d.dir("bin", [
|
| - d.file("hello.dart", "void main() => print('hello 2!');")
|
| - ])
|
| - ]);
|
| - });
|
| + d.git('foo.git', [
|
| + d.dir("bin", [
|
| + d.file("hello.dart", "void main() => print('Goodbye!');")
|
| + ])
|
| + ]).commit();
|
|
|
| pubUpgrade(output: contains("Precompiled foo:hello."));
|
|
|
| d.dir(p.join(appPath, '.pub', 'bin', 'foo'), [
|
| - d.matcherFile('hello.dart.snapshot', contains('hello 2!'))
|
| + d.matcherFile('hello.dart.snapshot', contains('Goodbye!'))
|
| ]).validate();
|
|
|
| var process = pubRun(args: ['foo:hello']);
|
| - process.stdout.expect("hello 2!");
|
| + process.stdout.expect("Goodbye!");
|
| process.shouldExit();
|
| });
|
| }
|
|
|