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

Unified Diff: runtime/observatory/test/command_test.dart

Issue 984683002: Allow command aliases in Observatory debugger. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 5 years, 10 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 | « runtime/observatory/lib/src/elements/debugger.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/test/command_test.dart
diff --git a/runtime/observatory/test/command_test.dart b/runtime/observatory/test/command_test.dart
index 81599819d7997b0b45f008c00fb0ea5aa9c2d72c..e0400f8e1184c8392bf575b9679faa521aa43482 100644
--- a/runtime/observatory/test/command_test.dart
+++ b/runtime/observatory/test/command_test.dart
@@ -203,11 +203,25 @@ void testCommandRunAmbiguous() {
}));
}
+void testCommandRunAlias() {
+ // Run a simple command.
+ StringBuffer out = new StringBuffer();
+ var aliasCmd = new TestCommand(out, 'alpha', []);
+ aliasCmd.alias = 'a';
+ RootCommand cmd = new RootCommand([aliasCmd,
+ new TestCommand(out, 'ankle', [])]);
+
+ cmd.runCommand('a 55').then(expectAsync((_) {
+ expect(out.toString(), equals('executing alpha([55])\n'));
+ }));
+}
+
main() {
test('command completion test suite', testCommandComplete);
test('run a simple command', testCommandRunSimple);
test('run a subcommand', testCommandRunSubcommand);
test('run a command which is not found', testCommandRunNotFound);
test('run a command which is ambiguous', testCommandRunAmbiguous);
+ test('run a command using an alias', testCommandRunAlias);
}
« no previous file with comments | « runtime/observatory/lib/src/elements/debugger.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698