| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2014, 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 'package:path/path.dart' as p; | |
| 8 import 'package:scheduled_test/scheduled_test.dart'; | |
| 9 | |
| 10 import '../descriptor.dart' as d; | |
| 11 import '../test_pub.dart'; | |
| 12 | |
| 13 main() { | |
| 14 initConfig(); | |
| 15 integration("upgrades a snapshot when a git dependency is upgraded", () { | |
| 16 ensureGit(); | |
| 17 | |
| 18 d.git('foo.git', [d.pubspec({ | |
| 19 "name": "foo", | |
| 20 "version": "0.0.1" | |
| 21 }), | |
| 22 d.dir( | |
| 23 "bin", | |
| 24 [d.file("hello.dart", "void main() => print('Hello!');")])]).creat
e(); | |
| 25 | |
| 26 d.appDir({ | |
| 27 "foo": { | |
| 28 "git": "../foo.git" | |
| 29 } | |
| 30 }).create(); | |
| 31 | |
| 32 pubGet(output: contains("Precompiled foo:hello.")); | |
| 33 | |
| 34 d.dir( | |
| 35 p.join(appPath, '.pub', 'bin', 'foo'), | |
| 36 [d.matcherFile('hello.dart.snapshot', contains('Hello!'))]).validate(); | |
| 37 | |
| 38 d.git( | |
| 39 'foo.git', | |
| 40 [ | |
| 41 d.dir( | |
| 42 "bin", | |
| 43 [d.file("hello.dart", "void main() => print('Goodbye!');")])]).c
ommit(); | |
| 44 | |
| 45 pubUpgrade(output: contains("Precompiled foo:hello.")); | |
| 46 | |
| 47 d.dir( | |
| 48 p.join(appPath, '.pub', 'bin', 'foo'), | |
| 49 [d.matcherFile('hello.dart.snapshot', contains('Goodbye!'))]).validate()
; | |
| 50 | |
| 51 var process = pubRun(args: ['foo:hello']); | |
| 52 process.stdout.expect("Goodbye!"); | |
| 53 process.shouldExit(); | |
| 54 }); | |
| 55 } | |
| OLD | NEW |