| Index: sdk/lib/_internal/pub/test/lish/does_not_publish_if_private_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/run/nonexistent_script_test.dart b/sdk/lib/_internal/pub/test/lish/does_not_publish_if_private_test.dart
|
| similarity index 53%
|
| copy from sdk/lib/_internal/pub/test/run/nonexistent_script_test.dart
|
| copy to sdk/lib/_internal/pub/test/lish/does_not_publish_if_private_test.dart
|
| index ce385fc0dd9b66a487aa906055b836674412473c..f570fc848330af42c4b72db131dd6aca707c41d3 100644
|
| --- a/sdk/lib/_internal/pub/test/run/nonexistent_script_test.dart
|
| +++ b/sdk/lib/_internal/pub/test/lish/does_not_publish_if_private_test.dart
|
| @@ -2,21 +2,19 @@
|
| // 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.
|
|
|
| -import 'package:path/path.dart' as p;
|
| -
|
| import '../../lib/src/exit_codes.dart' as exit_codes;
|
| import '../descriptor.dart' as d;
|
| import '../test_pub.dart';
|
|
|
| main() {
|
| initConfig();
|
| - integration('Errors if the script does not exist.', () {
|
| - d.dir(appPath, [
|
| - d.appPubspec()
|
| - ]).create();
|
| + integration('does not publish if the package is private', () {
|
| + var pkg = packageMap("test_pkg", "1.0.0");
|
| + pkg["publishTo"] = "none";
|
| + d.dir(appPath, [d.pubspec(pkg)]).create();
|
|
|
| - var pub = pubRun(args: ["script"]);
|
| - pub.stderr.expect("Could not find ${p.join("bin", "script.dart")}.");
|
| - pub.shouldExit(exit_codes.NO_INPUT);
|
| + schedulePub(args: ["lish"],
|
| + error: "A private package cannot be published.",
|
| + exitCode: exit_codes.DATA);
|
| });
|
| }
|
|
|