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

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: Blacklist '.DS_Store' files from publish. 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
« utils/pub/validator/license.dart ('K') | « 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..e870bddd7101fa74e9a50e9c84361a796831abc5 100644
--- a/utils/tests/pub/test_pub.dart
+++ b/utils/tests/pub/test_pub.dart
@@ -629,6 +629,21 @@ 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) {
nweiz 2012/12/12 21:21:21 I don't like that this only works with a specific
Bob Nystrom 2012/12/12 21:45:36 Agreed completely. Added a TODO.
+ 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].
« utils/pub/validator/license.dart ('K') | « 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