| OLD | NEW |
| 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 import 'dart:io'; | 7 import 'dart:io'; |
| 8 | 8 |
| 9 import 'test_pub.dart'; | 9 import 'test_pub.dart'; |
| 10 import '../../../pkg/unittest/lib/unittest.dart'; | 10 import '../../../pkg/unittest/lib/unittest.dart'; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 Usage: pub install | 98 Usage: pub install |
| 99 '''); | 99 '''); |
| 100 }); | 100 }); |
| 101 | 101 |
| 102 integration('shows help for a command', () { | 102 integration('shows help for a command', () { |
| 103 schedulePub(args: ['help', 'publish'], | 103 schedulePub(args: ['help', 'publish'], |
| 104 output: ''' | 104 output: ''' |
| 105 Publish the current package to pub.dartlang.org. | 105 Publish the current package to pub.dartlang.org. |
| 106 | 106 |
| 107 Usage: pub publish [options] | 107 Usage: pub publish [options] |
| 108 --server The package server to which to upload this package | 108 -n, --dry-run Validate but do not publish the package
|
| 109 (defaults to "https://pub.dartlang.org") | 109 --server The package server to which to upload this package |
| 110 (defaults to "https://pub.dartlang.org") |
| 110 '''); | 111 '''); |
| 111 }); | 112 }); |
| 112 | 113 |
| 113 integration('an unknown help command displays an error message', () { | 114 integration('an unknown help command displays an error message', () { |
| 114 schedulePub(args: ['help', 'quylthulg'], | 115 schedulePub(args: ['help', 'quylthulg'], |
| 115 error: ''' | 116 error: ''' |
| 116 Could not find a command named "quylthulg". | 117 Could not find a command named "quylthulg". |
| 117 Run "pub help" to see available commands. | 118 Run "pub help" to see available commands. |
| 118 ''', | 119 ''', |
| 119 exitCode: 64); | 120 exitCode: 64); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 138 // The "version" file generated on developer builds is a little funky and | 139 // The "version" file generated on developer builds is a little funky and |
| 139 // we need to make sure we don't choke on it. | 140 // we need to make sure we don't choke on it. |
| 140 dir(sdkPath, [ | 141 dir(sdkPath, [ |
| 141 file('version', '0.1.2.0_r16279_bobross'), | 142 file('version', '0.1.2.0_r16279_bobross'), |
| 142 ]).scheduleCreate(); | 143 ]).scheduleCreate(); |
| 143 | 144 |
| 144 schedulePub(args: ['version'], output: "Pub 0.1.2+0.r16279.bobross\n"); | 145 schedulePub(args: ['version'], output: "Pub 0.1.2+0.r16279.bobross\n"); |
| 145 }); | 146 }); |
| 146 }); | 147 }); |
| 147 } | 148 } |
| OLD | NEW |