| Index: sdk/lib/_internal/pub/test/get/path/empty_pubspec_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/get/path/path_is_file_test.dart b/sdk/lib/_internal/pub/test/get/path/empty_pubspec_test.dart
|
| similarity index 50%
|
| copy from sdk/lib/_internal/pub/test/get/path/path_is_file_test.dart
|
| copy to sdk/lib/_internal/pub/test/get/path/empty_pubspec_test.dart
|
| index 81524c808d61eed7dfecc5e23aa86068aa8d9e2c..4950bec5bf855264c9627dfe9eddd9bac39ab325 100644
|
| --- a/sdk/lib/_internal/pub/test/get/path/path_is_file_test.dart
|
| +++ b/sdk/lib/_internal/pub/test/get/path/empty_pubspec_test.dart
|
| @@ -2,29 +2,29 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE d.file.
|
|
|
| -import 'package:path/path.dart' as path;
|
| +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('path dependency when path is a file', () {
|
| + // Regression test for issue 20103.
|
| + integration('path dependency to an empty pubspec', () {
|
| d.dir('foo', [
|
| d.libDir('foo'),
|
| - d.libPubspec('foo', '0.0.1')
|
| + d.file('pubspec.yaml', '')
|
| ]).create();
|
|
|
| - d.file('dummy.txt', '').create();
|
| - var dummyPath = path.join(sandboxDir, 'dummy.txt');
|
| -
|
| d.dir(appPath, [
|
| d.appPubspec({
|
| - "foo": {"path": dummyPath}
|
| + "foo": {"path": "../foo"}
|
| })
|
| ]).create();
|
|
|
| - pubGet(error: 'Path dependency for package foo must refer to a '
|
| - 'directory, not a file. Was "$dummyPath".');
|
| + pubGet(exitCode: exit_codes.DATA, error:
|
| + 'Error on line 1, column 1 of ${p.join('..', 'foo', 'pubspec.yaml')}: '
|
| + 'Missing the required "name" field.');
|
| });
|
| }
|
|
|