OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 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 | 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 library pub_tests; | 5 library pub_tests; |
6 | 6 |
7 import 'package:path/path.dart' as p; | 7 import 'package:path/path.dart' as p; |
8 import 'package:scheduled_test/scheduled_test.dart'; | 8 import 'package:scheduled_test/scheduled_test.dart'; |
9 | 9 |
10 import '../descriptor.dart' as d; | 10 import '../descriptor.dart' as d; |
11 import '../test_pub.dart'; | 11 import '../test_pub.dart'; |
12 | 12 |
13 main() { | 13 main() { |
14 initConfig(); | |
15 integration("upgrades a snapshot when a git dependency is upgraded", () { | 14 integration("upgrades a snapshot when a git dependency is upgraded", () { |
16 ensureGit(); | 15 ensureGit(); |
17 | 16 |
18 d.git('foo.git', [ | 17 d.git('foo.git', [ |
19 d.pubspec({ | 18 d.pubspec({ |
20 "name": "foo", | 19 "name": "foo", |
21 "version": "0.0.1" | 20 "version": "0.0.1" |
22 }), | 21 }), |
23 d.dir("bin", [ | 22 d.dir("bin", [ |
24 d.file("hello.dart", "void main() => print('Hello!');") | 23 d.file("hello.dart", "void main() => print('Hello!');") |
(...skipping 18 matching lines...) Expand all Loading... |
43 | 42 |
44 d.dir(p.join(appPath, '.pub', 'bin', 'foo'), [ | 43 d.dir(p.join(appPath, '.pub', 'bin', 'foo'), [ |
45 d.matcherFile('hello.dart.snapshot', contains('Goodbye!')) | 44 d.matcherFile('hello.dart.snapshot', contains('Goodbye!')) |
46 ]).validate(); | 45 ]).validate(); |
47 | 46 |
48 var process = pubRun(args: ['foo:hello']); | 47 var process = pubRun(args: ['foo:hello']); |
49 process.stdout.expect("Goodbye!"); | 48 process.stdout.expect("Goodbye!"); |
50 process.shouldExit(); | 49 process.shouldExit(); |
51 }); | 50 }); |
52 } | 51 } |
OLD | NEW |