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

Side by Side 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, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library('pub_tests'); 5 #library('pub_tests');
6 6
7 // TODO(rnystrom): Better path to unittest. 7 #import('dart:io');
8
9 #import('test_pub.dart');
8 #import('../../../lib/unittest/unittest_vm.dart'); 10 #import('../../../lib/unittest/unittest_vm.dart');
9 11
10 main() { 12 main() {
11 test('should pass', () { 13 group('running pub with no command', () {
12 expect(1).equals(1); 14 testOutput('displays usage',
15 [],
16 '''
17 Pub is a package manager for Dart.
18
19 Usage:
20
21 pub command [arguments]
22
23 The commands are:
24
25 version print Pub version
26
27 Use "pub help [command]" for more information about a command.''');
28 });
29
30 group('the version command', () {
31 testOutput('displays the current version',
32 ['version'], 'Pub 0.0.0');
33 });
34
35 group('an unknown command', () {
36 testOutput('displays an error message',
37 ['quylthulg'],
38 '''
39 Unknown command "quylthulg".
40 Run "pub help" to see available commands.''',
41 exitCode: 64);
13 }); 42 });
14 } 43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698