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

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

Issue 12433014: Dev dependencies. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: List all colliding package names. Created 7 years, 9 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
« no previous file with comments | « utils/pub/version_solver.dart ('k') | utils/tests/pub/pubspec_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/dev_dependency_test.dart
diff --git a/utils/tests/pub/dev_dependency_test.dart b/utils/tests/pub/dev_dependency_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..961d2084bf080f324b3a1a9139e1c632e43bd7c1
--- /dev/null
+++ b/utils/tests/pub/dev_dependency_test.dart
@@ -0,0 +1,116 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import '../../../pkg/pathos/lib/path.dart' as path;
+
+import 'test_pub.dart';
+
+main() {
+ initConfig();
+ integration("includes root package's dev dependencies", () {
+ dir('foo', [
+ libDir('foo'),
+ libPubspec('foo', '0.0.1')
+ ]).scheduleCreate();
+
+ dir('bar', [
+ libDir('bar'),
+ libPubspec('bar', '0.0.1')
+ ]).scheduleCreate();
+
+ dir(appPath, [
+ pubspec({
+ "name": "myapp",
+ "dev_dependencies": {
+ "foo": {"path": "../foo"},
+ "bar": {"path": "../bar"},
+ }
+ })
+ ]).scheduleCreate();
+
+ schedulePub(args: ["install"],
+ output: new RegExp(r"Dependencies installed!$"));
+
+ dir(packagesPath, [
+ dir("foo", [
+ file("foo.dart", 'main() => "foo";')
+ ]),
+ dir("bar", [
+ file("bar.dart", 'main() => "bar";')
+ ])
+ ]).scheduleValidate();
+ });
+
+ integration("includes dev dependency's transitive dependencies", () {
+ dir('foo', [
+ libDir('foo'),
+ libPubspec('foo', '0.0.1', deps: [
+ {"path": "../bar"}
+ ])
+ ]).scheduleCreate();
+
+ dir('bar', [
+ libDir('bar'),
+ libPubspec('bar', '0.0.1')
+ ]).scheduleCreate();
+
+ dir(appPath, [
+ pubspec({
+ "name": "myapp",
+ "dev_dependencies": {
+ "foo": {"path": "../foo"}
+ }
+ })
+ ]).scheduleCreate();
+
+ schedulePub(args: ["install"],
+ output: new RegExp(r"Dependencies installed!$"));
+
+ dir(packagesPath, [
+ dir("foo", [
+ file("foo.dart", 'main() => "foo";')
+ ]),
+ dir("bar", [
+ file("bar.dart", 'main() => "bar";')
+ ])
+ ]).scheduleValidate();
+ });
+
+ integration("ignores transitive dependency's dev dependencies", () {
+ dir('foo', [
+ libDir('foo'),
+ pubspec({
+ "name": "foo",
+ "version": "0.0.1",
+ "dev_dependencies": {
+ "bar": {"path": "../bar"}
+ }
+ })
+ ]).scheduleCreate();
+
+ dir('bar', [
+ libDir('bar'),
+ libPubspec('bar', '0.0.1')
+ ]).scheduleCreate();
+
+ dir(appPath, [
+ pubspec({
+ "name": "myapp",
+ "dependencies": {
+ "foo": {"path": "../foo"}
+ }
+ })
+ ]).scheduleCreate();
+
+ schedulePub(args: ["install"],
+ output: new RegExp(r"Dependencies installed!$"));
+
+ dir(packagesPath, [
+ dir("foo", [
+ file("foo.dart", 'main() => "foo";')
+ ]),
+ nothing("bar")
+ ]).scheduleValidate();
+ });
+}
« no previous file with comments | « utils/pub/version_solver.dart ('k') | utils/tests/pub/pubspec_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698