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

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

Issue 9950005: First check in for pub package manager. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Respond to review. Created 8 years, 9 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: utils/tests/pub/pub_tests.dart
diff --git a/utils/tests/pub/pub_tests.dart b/utils/tests/pub/pub_tests.dart
index 53456fd48cdff396c75090e8c39e45b90674bb78..fe87c73b4b88dc2b215a443cb0fa6e11fd981c43 100644
--- a/utils/tests/pub/pub_tests.dart
+++ b/utils/tests/pub/pub_tests.dart
@@ -4,11 +4,40 @@
#library('pub_tests');
-// TODO(rnystrom): Better path to unittest.
+#import('dart:io');
+
+#import('test_pub.dart');
#import('../../../lib/unittest/unittest_vm.dart');
main() {
- test('should pass', () {
- expect(1).equals(1);
+ group('running pub with no command', () {
+ testOutput('displays usage',
+ [],
+ '''
+ Pub is a package manager for Dart.
+
+ Usage:
+
+ pub command [arguments]
+
+ The commands are:
+
+ version print Pub version
+
+ Use "pub help [command]" for more information about a command.''');
+ });
+
+ group('the version command', () {
+ testOutput('displays the current version',
+ ['version'], 'Pub 0.0.0');
+ });
+
+ group('an unknown command', () {
+ testOutput('displays an error message',
+ ['quylthulg'],
+ '''
+ Unknown command "quylthulg".
+ Run "pub help" to see available commands.''',
+ exitCode: 64);
});
}

Powered by Google App Engine
This is Rietveld 408576698