| 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 Preview publishing the package |
| 109 (defaults to "https://pub.dartlang.org") | 109 Validate but do not publish the package |
| 110 |
| 111 --server The package server to which to upload this package |
| 112 (defaults to "https://pub.dartlang.org") |
| 110 '''); | 113 '''); |
| 111 }); | 114 }); |
| 112 | 115 |
| 113 integration('an unknown help command displays an error message', () { | 116 integration('an unknown help command displays an error message', () { |
| 114 schedulePub(args: ['help', 'quylthulg'], | 117 schedulePub(args: ['help', 'quylthulg'], |
| 115 error: ''' | 118 error: ''' |
| 116 Could not find a command named "quylthulg". | 119 Could not find a command named "quylthulg". |
| 117 Run "pub help" to see available commands. | 120 Run "pub help" to see available commands. |
| 118 ''', | 121 ''', |
| 119 exitCode: 64); | 122 exitCode: 64); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 138 // The "version" file generated on developer builds is a little funky and | 141 // The "version" file generated on developer builds is a little funky and |
| 139 // we need to make sure we don't choke on it. | 142 // we need to make sure we don't choke on it. |
| 140 dir(sdkPath, [ | 143 dir(sdkPath, [ |
| 141 file('version', '0.1.2.0_r16279_bobross'), | 144 file('version', '0.1.2.0_r16279_bobross'), |
| 142 ]).scheduleCreate(); | 145 ]).scheduleCreate(); |
| 143 | 146 |
| 144 schedulePub(args: ['version'], output: "Pub 0.1.2+0.r16279.bobross\n"); | 147 schedulePub(args: ['version'], output: "Pub 0.1.2+0.r16279.bobross\n"); |
| 145 }); | 148 }); |
| 146 }); | 149 }); |
| 147 } | 150 } |
| OLD | NEW |