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

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

Issue 11557008: Make pub publish more user friendly: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge in path changes. Created 8 years 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/tests/pub/pub_lish_test.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/test_pub.dart
diff --git a/utils/tests/pub/test_pub.dart b/utils/tests/pub/test_pub.dart
index aa8e8797bdfb22776be4e989e8ee260b518b0744..80137a0d5580a7fc73f3f8ba023ce963ca3a4522 100644
--- a/utils/tests/pub/test_pub.dart
+++ b/utils/tests/pub/test_pub.dart
@@ -629,6 +629,23 @@ ScheduledProcess startPubLish(ScheduledServer server, {List<String> args}) {
return new ScheduledProcess("pub lish", process);
}
+/// Handles the beginning confirmation process for uploading a packages.
+/// Ensures that the right output is shown and then enters "y" to confirm the
+/// upload.
+void confirmPublish(ScheduledProcess pub) {
+ // TODO(rnystrom): This is overly specific and inflexible regarding different
+ // test packages. Should validate this a little more loosely.
+ expectLater(pub.nextLine(), equals('Publishing "test_pkg" 1.0.0:'));
+ expectLater(pub.nextLine(), equals("|-- LICENSE"));
+ expectLater(pub.nextLine(), equals("|-- lib"));
+ expectLater(pub.nextLine(), equals("| '-- test_pkg.dart"));
+ expectLater(pub.nextLine(), equals("'-- pubspec.yaml"));
+ expectLater(pub.nextLine(), equals(""));
+
+ pub.writeLine("y");
+}
+
+
/// Calls [fn] with appropriately modified arguments to run a pub process. [fn]
/// should have the same signature as [startProcess], except that the returned
/// [Future] may have a type other than [Process].
« no previous file with comments | « utils/tests/pub/pub_lish_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698