656e98150b
Review URL: https://chromiumcodereview.appspot.com//10037027 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6480 260f80e4-7a28-3924-810f-c04153c831b5
44 lines
1.0 KiB
Dart
44 lines
1.0 KiB
Dart
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#library('pub_tests');
|
|
|
|
#import('dart:io');
|
|
|
|
#import('test_pub.dart');
|
|
#import('../../../lib/unittest/unittest.dart');
|
|
|
|
main() {
|
|
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);
|
|
});
|
|
}
|