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

Unified Diff: utils/tests/pub/pub_install_sdk_test.dart

Issue 10947050: Support dependencies in SDK packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: utils/tests/pub/pub_install_sdk_test.dart
diff --git a/utils/tests/pub/pub_install_sdk_test.dart b/utils/tests/pub/pub_install_sdk_test.dart
index c51d363c924d0902ceaa86ad18bc83305159c9f7..9b81c4b74dc6afb07464ef054a97060193f3a1a6 100644
--- a/utils/tests/pub/pub_install_sdk_test.dart
+++ b/utils/tests/pub/pub_install_sdk_test.dart
@@ -15,7 +15,8 @@ main() {
file('revision', '1234'),
dir('pkg', [
dir('foo', [
- libDir('foo', 'foo 0.0.1234')
+ libDir('foo', 'foo 0.0.1234'),
+ libPubspec('foo', '0.0.0-not.used')
])
])
]).scheduleCreate();
@@ -33,4 +34,42 @@ main() {
run();
});
+
+ test('includes transitive dependencies', () {
+ dir(sdkPath, [
+ file('revision', '1234'),
+ dir('pkg', [
+ dir('foo', [
+ libDir('foo', 'foo 0.0.1234'),
+ pubspec({
nweiz 2012/09/19 23:38:53 I think you can use libPubspec here.
Bob Nystrom 2012/09/20 01:00:08 Done.
+ "name": "foo",
+ "version": "0.0.0-not.used",
+ "dependencies": {
+ "bar": {"sdk": "bar"}
+ }
+ })
+ ]),
+ dir('bar', [
+ libDir('bar', 'bar 0.0.1234'),
+ libPubspec('bar', '0.0.0-not.used')
+ ])
+ ])
+ ]).scheduleCreate();
+
+ dir(appPath, [
+ pubspec({'name': 'myapp', 'dependencies': {'foo': {'sdk': 'foo'}}})
nweiz 2012/09/19 23:38:53 And appPubspec here.
Bob Nystrom 2012/09/20 01:00:08 Done.
+ ]).scheduleCreate();
+
+ schedulePub(args: ['install'],
+ output: '''
nweiz 2012/09/19 23:38:53 Elsewhere we use `const RegExp(@"Dependencies inst
Bob Nystrom 2012/09/20 01:00:08 Done.
+ Dependencies installed!
+ ''');
+
+ packagesDir({
+ 'foo': '0.0.1234',
+ 'bar': '0.0.1234'
+ }).scheduleValidate();
+
+ run();
+ });
}

Powered by Google App Engine
This is Rietveld 408576698