Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: sdk/lib/_internal/pub/test/pub_install_and_update_test.dart

Issue 22825024: Don't allow packages to depend on themselves. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698