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:scheduled_test/scheduled_test.dart'; | 7 import 'package:scheduled_test/scheduled_test.dart'; |
8 | 8 |
9 import 'descriptor.dart' as d; | 9 import 'descriptor.dart' as d; |
10 import 'test_pub.dart'; | 10 import 'test_pub.dart'; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 d.dir(appPath, [ | 106 d.dir(appPath, [ |
107 d.appPubspec({ | 107 d.appPubspec({ |
108 "foo": {"path": "../deps/foo"}, | 108 "foo": {"path": "../deps/foo"}, |
109 "bar": {"path": "../deps/bar"} | 109 "bar": {"path": "../deps/bar"} |
110 }) | 110 }) |
111 ]).create(); | 111 ]).create(); |
112 | 112 |
113 pubCommand(command, | 113 pubCommand(command, |
114 error: new RegExp("^Incompatible dependencies on 'baz':\n")); | 114 error: new RegExp("^Incompatible dependencies on 'baz':\n")); |
115 }); | 115 }); |
| 116 |
| 117 integration('does not allow a dependency on itself', () { |
| 118 d.dir(appPath, [ |
| 119 d.appPubspec({ |
| 120 "myapp": {"path": "."} |
| 121 }) |
| 122 ]).create(); |
| 123 |
| 124 pubCommand(command, |
| 125 error: new RegExp("Package 'myapp' cannot depend on itself.")); |
| 126 }); |
| 127 |
| 128 integration('does not allow a dev dependency on itself', () { |
| 129 d.dir(appPath, [ |
| 130 d.pubspec({ |
| 131 "name": "myapp", |
| 132 "dev_dependencies": { |
| 133 "myapp": {"path": "."} |
| 134 } |
| 135 }) |
| 136 ]).create(); |
| 137 |
| 138 pubCommand(command, |
| 139 error: new RegExp("Package 'myapp' cannot depend on itself.")); |
| 140 }); |
116 }); | 141 }); |
117 } | 142 } |
OLD | NEW |