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

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

Issue 16034002: Use helper methods for running pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Get rid of unnecessary RegExps in tests. Created 7 years, 7 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 50f6343150c1abb343bd5845febb3aef2678cfb0..c9ee7d2093ec9a3d35702a5a82ce1e405eb73ea4 100644
--- a/sdk/lib/_internal/pub/test/test_pub.dart
+++ b/sdk/lib/_internal/pub/test/test_pub.dart
@@ -238,15 +238,13 @@ bool _abortScheduled = false;
/// Enum identifying a pub command that can be run with a well-defined success
/// output.
class RunCommand {
- static final install = new RunCommand('install',
- new RegExp("Dependencies installed!\$"));
-
- static final update = new RunCommand('update',
- new RegExp("Dependencies updated!\$"));
+ static final install = new RunCommand('install', 'installed');
+ static final update = new RunCommand('update', 'updated');
final String name;
final RegExp success;
- RunCommand(this.name, this.success);
+ RunCommand(this.name, String verb)
+ : success = new RegExp("Dependencies $verb!\$");
}
/// Many tests validate behavior that is the same between pub install and
« no previous file with comments | « sdk/lib/_internal/pub/test/pub_install_and_update_test.dart ('k') | sdk/lib/_internal/pub/test/unknown_source_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698