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 'package:pub/src/exit_codes.dart' as exit_codes; | 7 import 'package:pub/src/exit_codes.dart' as exit_codes; |
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('requires the dependency name to match the remote pubspec ' | 14 integration('requires the dependency name to match the remote pubspec ' |
16 'name', () { | 15 'name', () { |
17 ensureGit(); | 16 ensureGit(); |
18 | 17 |
19 d.git('foo.git', [ | 18 d.git('foo.git', [ |
20 d.libDir('foo'), | 19 d.libDir('foo'), |
21 d.libPubspec('foo', '1.0.0') | 20 d.libPubspec('foo', '1.0.0') |
22 ]).create(); | 21 ]).create(); |
23 | 22 |
24 d.dir(appPath, [ | 23 d.dir(appPath, [ |
25 d.appPubspec({ | 24 d.appPubspec({ |
26 "weirdname": {"git": "../foo.git"} | 25 "weirdname": {"git": "../foo.git"} |
27 }) | 26 }) |
28 ]).create(); | 27 ]).create(); |
29 | 28 |
30 pubGet(error: contains('"name" field doesn\'t match expected name ' | 29 pubGet(error: contains('"name" field doesn\'t match expected name ' |
31 '"weirdname".'), exitCode: exit_codes.DATA); | 30 '"weirdname".'), exitCode: exit_codes.DATA); |
32 }); | 31 }); |
33 } | 32 } |
OLD | NEW |