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

Unified Diff: sdk/lib/_internal/pub/test/test_pub.dart

Issue 329303006: Add "--dry-run" to pub upgrade. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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
Index: sdk/lib/_internal/pub/test/test_pub.dart
diff --git a/sdk/lib/_internal/pub/test/test_pub.dart b/sdk/lib/_internal/pub/test/test_pub.dart
index a6481e74c03b46739f9cfc4e469fc36cddbcc39f..2380ed31d10e97c22177401a1f972b7de5a88863 100644
--- a/sdk/lib/_internal/pub/test/test_pub.dart
+++ b/sdk/lib/_internal/pub/test/test_pub.dart
@@ -327,10 +327,11 @@ void forBothPubGetAndUpgrade(void callback(RunCommand command)) {
/// understands the normal output of a successful pub command. If [warning] is
/// given, it expects the command to complete successfully *and* print
/// [warning] to stderr. If [error] is given, it expects the command to *only*
-/// print [error] to stderr.
+/// print [error] to stderr. [output], [error], and [warning] may be strings,
+/// [RegExp]s, or [Matcher]s.
// TODO(rnystrom): Clean up other tests to call this when possible.
void pubCommand(RunCommand command,
- {Iterable<String> args, Pattern output, Pattern error, Pattern warning}) {
+ {Iterable<String> args, output, error, warning}) {
if (error != null && warning != null) {
throw new ArgumentError("Cannot pass both 'error' and 'warning'.");
}
@@ -350,13 +351,11 @@ void pubCommand(RunCommand command,
schedulePub(args: allArgs, output: output, error: error, exitCode: exitCode);
}
-void pubGet({Iterable<String> args, Pattern error,
- Pattern warning}) {
+void pubGet({Iterable<String> args, error, warning}) {
pubCommand(RunCommand.get, args: args, error: error, warning: warning);
}
-void pubUpgrade({Iterable<String> args, Pattern output, Pattern error,
- Pattern warning}) {
+void pubUpgrade({Iterable<String> args, output, error, warning}) {
pubCommand(RunCommand.upgrade, args: args, output: output, error: error,
warning: warning);
}

Powered by Google App Engine
This is Rietveld 408576698