| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 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 | 
|  | 3 // BSD-style license that can be found in the LICENSE file. | 
|  | 4 | 
|  | 5 #library('pub_tests'); | 
|  | 6 | 
|  | 7 #import('dart:io'); | 
|  | 8 | 
|  | 9 #import('../../test_pub.dart'); | 
|  | 10 #import('../../../../../pkg/unittest/unittest.dart'); | 
|  | 11 | 
|  | 12 main() { | 
|  | 13   test('keeps a Git package locked to the version in the lockfile', () { | 
|  | 14     ensureGit(); | 
|  | 15 | 
|  | 16     git('foo.git', [ | 
|  | 17       libDir('foo'), | 
|  | 18       libPubspec('foo', '1.0.0') | 
|  | 19     ]).scheduleCreate(); | 
|  | 20 | 
|  | 21     appDir([{"git": "../foo.git"}]).scheduleCreate(); | 
|  | 22 | 
|  | 23     // This install should lock the foo.git dependency to the current revision. | 
|  | 24     schedulePub(args: ['install'], | 
|  | 25         output: const RegExp(r"Dependencies installed!$")); | 
|  | 26 | 
|  | 27     dir(packagesPath, [ | 
|  | 28       dir('foo', [ | 
|  | 29         file('foo.dart', 'main() => "foo";') | 
|  | 30       ]) | 
|  | 31     ]).scheduleValidate(); | 
|  | 32 | 
|  | 33     // Delete the packages path to simulate a new checkout of the application. | 
|  | 34     dir(packagesPath).scheduleDelete(); | 
|  | 35 | 
|  | 36     git('foo.git', [ | 
|  | 37       libDir('foo', 'foo 2'), | 
|  | 38       libPubspec('foo', '1.0.0') | 
|  | 39     ]).scheduleCommit(); | 
|  | 40 | 
|  | 41     // This install shouldn't update the foo.git dependency due to the lockfile. | 
|  | 42     schedulePub(args: ['install'], | 
|  | 43         output: const RegExp(r"Dependencies installed!$")); | 
|  | 44 | 
|  | 45     dir(packagesPath, [ | 
|  | 46       dir('foo', [ | 
|  | 47         file('foo.dart', 'main() => "foo";') | 
|  | 48       ]) | 
|  | 49     ]).scheduleValidate(); | 
|  | 50 | 
|  | 51     run(); | 
|  | 52   }); | 
|  | 53 } | 
| OLD | NEW | 
|---|