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