Index: sdk/lib/_internal/pub_generated/test/dependency_override_test.dart |
diff --git a/sdk/lib/_internal/pub_generated/test/dependency_override_test.dart b/sdk/lib/_internal/pub_generated/test/dependency_override_test.dart |
index 6d7e979f1c7cb0871c7f69cfb582b2aca5e0e6b2..51eef32407ed02a9781a9ace6690b2696d7fc814 100644 |
--- a/sdk/lib/_internal/pub_generated/test/dependency_override_test.dart |
+++ b/sdk/lib/_internal/pub_generated/test/dependency_override_test.dart |
@@ -1,6 +1,12 @@ |
+// 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 'package:path/path.dart' as path; |
+ |
import 'descriptor.dart' as d; |
import 'test_pub.dart'; |
+ |
main() { |
initConfig(); |
forBothPubGetAndUpgrade((command) { |
@@ -10,6 +16,7 @@ main() { |
builder.serve("foo", "2.0.0"); |
builder.serve("foo", "3.0.0"); |
}); |
+ |
d.dir(appPath, [d.pubspec({ |
"name": "myapp", |
"dependencies": { |
@@ -19,26 +26,33 @@ main() { |
"foo": "<3.0.0" |
} |
})]).create(); |
+ |
pubCommand(command); |
+ |
d.packagesDir({ |
"foo": "2.0.0" |
}).validate(); |
}); |
+ |
integration("treats override as implicit dependency", () { |
servePackages((builder) { |
builder.serve("foo", "1.0.0"); |
}); |
+ |
d.dir(appPath, [d.pubspec({ |
"name": "myapp", |
"dependency_overrides": { |
"foo": "any" |
} |
})]).create(); |
+ |
pubCommand(command); |
+ |
d.packagesDir({ |
"foo": "1.0.0" |
}).validate(); |
}); |
+ |
integration("ignores other constraints on overridden package", () { |
servePackages((builder) { |
builder.serve("foo", "1.0.0"); |
@@ -50,6 +64,7 @@ main() { |
} |
}); |
}); |
+ |
d.dir(appPath, [d.pubspec({ |
"name": "myapp", |
"dependencies": { |
@@ -59,18 +74,23 @@ main() { |
"foo": "<3.0.0" |
} |
})]).create(); |
+ |
pubCommand(command); |
+ |
d.packagesDir({ |
"foo": "2.0.0", |
"bar": "1.0.0" |
}).validate(); |
}); |
+ |
integration("warns about overridden dependencies", () { |
servePackages((builder) { |
builder.serve("foo", "1.0.0"); |
builder.serve("bar", "1.0.0"); |
}); |
+ |
d.dir("baz", [d.libDir("baz"), d.libPubspec("baz", "0.0.1")]).create(); |
+ |
d.dir(appPath, [d.pubspec({ |
"name": "myapp", |
"dependency_overrides": { |
@@ -81,7 +101,9 @@ main() { |
} |
} |
})]).create(); |
+ |
var bazPath = path.join("..", "baz"); |
+ |
schedulePub(args: [command.name], output: command.success, error: """ |
Warning: You are using these overridden dependencies: |
! bar 1.0.0 |