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 library pub_tests; | 5 library pub_tests; |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 | 8 |
9 import '../../test_pub.dart'; | 9 import '../../test_pub.dart'; |
10 import '../../../../../pkg/unittest/lib/unittest.dart'; | |
11 | 10 |
12 main() { | 11 main() { |
13 test('doesn\'t require the repository name to match the name in the ' | 12 integration('doesn\'t require the repository name to match the name in the ' |
14 'pubspec', () { | 13 'pubspec', () { |
15 ensureGit(); | 14 ensureGit(); |
16 | 15 |
17 git('foo.git', [ | 16 git('foo.git', [ |
18 libDir('weirdname'), | 17 libDir('weirdname'), |
19 libPubspec('weirdname', '1.0.0') | 18 libPubspec('weirdname', '1.0.0') |
20 ]).scheduleCreate(); | 19 ]).scheduleCreate(); |
21 | 20 |
22 dir(appPath, [ | 21 dir(appPath, [ |
23 pubspec({ | 22 pubspec({ |
24 "name": "myapp", | 23 "name": "myapp", |
25 "dependencies": { | 24 "dependencies": { |
26 "weirdname": {"git": "../foo.git"} | 25 "weirdname": {"git": "../foo.git"} |
27 } | 26 } |
28 }) | 27 }) |
29 ]).scheduleCreate(); | 28 ]).scheduleCreate(); |
30 | 29 |
31 schedulePub(args: ['install'], | 30 schedulePub(args: ['install'], |
32 output: new RegExp(r"Dependencies installed!$")); | 31 output: new RegExp(r"Dependencies installed!$")); |
33 | 32 |
34 dir(packagesPath, [ | 33 dir(packagesPath, [ |
35 dir('weirdname', [ | 34 dir('weirdname', [ |
36 file('weirdname.dart', 'main() => "weirdname";') | 35 file('weirdname.dart', 'main() => "weirdname";') |
37 ]) | 36 ]) |
38 ]).scheduleValidate(); | 37 ]).scheduleValidate(); |
39 | |
40 run(); | |
41 }); | 38 }); |
42 } | 39 } |
OLD | NEW |