| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file | 
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a | 
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. | 
| 4 | 4 | 
| 5 import '../../descriptor.dart' as d; | 5 import '../../descriptor.dart' as d; | 
| 6 import '../../test_pub.dart'; | 6 import '../../test_pub.dart'; | 
| 7 | 7 | 
| 8 main() { | 8 main() { | 
| 9   integration("doesn't upgrade a locked Git package with a new compatible " | 9   integration("doesn't upgrade a locked Git package with a new compatible " | 
| 10       "constraint", () { | 10       "constraint", () { | 
| 11     ensureGit(); | 11     ensureGit(); | 
| 12 | 12 | 
| 13     d.git('foo.git', [ | 13     d.git('foo.git', [ | 
| 14       d.libDir('foo', 'foo 1.0.0'), | 14       d.libDir('foo', 'foo 1.0.0'), | 
| 15       d.libPubspec("foo", "1.0.0") | 15       d.libPubspec("foo", "1.0.0") | 
| 16     ]).create(); | 16     ]).create(); | 
| 17 | 17 | 
| 18     d.appDir({"foo": {"git": "../foo.git"}}).create(); | 18     d.appDir({"foo": {"git": "../foo.git"}}).create(); | 
| 19 | 19 | 
| 20     pubGet(); | 20     // TODO(rnystrom): Remove "--packages-dir" and validate using the | 
|  | 21     // ".packages" file instead of looking in the "packages" directory. | 
|  | 22     pubGet(args: ["--packages-dir"]); | 
| 21 | 23 | 
| 22     d.dir(packagesPath, [ | 24     d.dir(packagesPath, [ | 
| 23       d.dir('foo', [ | 25       d.dir('foo', [ | 
| 24         d.file('foo.dart', 'main() => "foo 1.0.0";') | 26         d.file('foo.dart', 'main() => "foo 1.0.0";') | 
| 25       ]) | 27       ]) | 
| 26     ]).validate(); | 28     ]).validate(); | 
| 27 | 29 | 
| 28     d.git('foo.git', [ | 30     d.git('foo.git', [ | 
| 29       d.libDir('foo', 'foo 1.0.1'), | 31       d.libDir('foo', 'foo 1.0.1'), | 
| 30       d.libPubspec("foo", "1.0.1") | 32       d.libPubspec("foo", "1.0.1") | 
| 31     ]).commit(); | 33     ]).commit(); | 
| 32 | 34 | 
| 33     d.appDir({"foo": {"git": "../foo.git", "version": ">=1.0.0"}}).create(); | 35     d.appDir({"foo": {"git": "../foo.git", "version": ">=1.0.0"}}).create(); | 
| 34 | 36 | 
| 35     pubGet(); | 37     // TODO(rnystrom): Remove "--packages-dir" and validate using the | 
|  | 38     // ".packages" file instead of looking in the "packages" directory. | 
|  | 39     pubGet(args: ["--packages-dir"]); | 
| 36 | 40 | 
| 37     d.dir(packagesPath, [ | 41     d.dir(packagesPath, [ | 
| 38       d.dir('foo', [ | 42       d.dir('foo', [ | 
| 39         d.file('foo.dart', 'main() => "foo 1.0.0";') | 43         d.file('foo.dart', 'main() => "foo 1.0.0";') | 
| 40       ]) | 44       ]) | 
| 41     ]).validate(); | 45     ]).validate(); | 
| 42   }); | 46   }); | 
| 43 } | 47 } | 
| OLD | NEW | 
|---|