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

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

Issue 10809057: Make "pub update" update all packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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/entrypoint.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/pub_test.dart
diff --git a/utils/tests/pub/pub_test.dart b/utils/tests/pub/pub_test.dart
index 242551c3dffc8922ca801e1265e3baeb0d02284c..168c9175dab557e14866f43102e24665915fab7a 100644
--- a/utils/tests/pub/pub_test.dart
+++ b/utils/tests/pub/pub_test.dart
@@ -869,6 +869,64 @@ dependencies:
});
}
+updateCommand() {
+ test("updates locked Git packages", () {
+ ensureGit();
+
+ git('foo.git', [
+ file('foo.dart', 'main() => "foo";')
+ ]).scheduleCreate();
+
+ git('bar.git', [
+ file('bar.dart', 'main() => "bar";')
+ ]).scheduleCreate();
+
+ dir(appPath, [
+ file('pubspec.yaml', '''
+dependencies:
+ foo:
+ git: ../foo.git
+ bar:
+ git: ../foo.git
+''')
+ ]).scheduleCreate();
+
+ schedulePub(args: ['install'],
+ output: const RegExp(@"Dependencies installed!$"));
+
+ dir(packagesPath, [
+ dir('foo', [
+ file('foo.dart', 'main() => "foo";')
+ ]),
+ dir('bar', [
+ file('bar.dart', 'main() => "bar";')
+ ])
+ ]).scheduleValidate();
+
+ git('foo.git', [
+ file('foo.dart', 'main() => "foo 2";')
+ ]).scheduleCommit();
+
+ git('bar.git', [
+ file('bar.dart', 'main() => "bar 2";')
+ ]).scheduleCommit();
+
+ schedulePub(args: ['update'],
+ output: const RegExp(@"Dependencies updated!$"));
+
+ dir(packagesPath, [
+ dir('foo', [
+ file('foo.dart', 'main() => "foo 2";')
+ ]),
+ dir('bar', [
+ file('bar.dart', 'main() => "bar 2";')
+ ])
+ ]).scheduleValidate();
+
+ run();
+ });
+}
+
versionCommand() {
test('displays the current version', () =>
runPub(args: ['version'], output: VERSION_STRING));
« no previous file with comments | « utils/pub/entrypoint.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698